GetTextBlockCharQuad

Text, Extraction, Geometry

Description

Returns the four corners of an extracted character cell after applying the selected document origin and scale

Syntax

Delphi

Function TPDFlib.GetTextBlockCharQuad(TextBlockListID, Index, CharIndex: Integer; Out X1, Y1, X2, Y2, X3, Y3, X4, Y4: Double): Integer;

Parameters

TextBlockListIDHandle returned by ExtractPageTextBlocks
IndexOne-based text block index within that list
CharIndexOne-based character index within the block's extracted text
X1, Y1, X2, Y2, X3, Y3, X4, Y4The four corners in source cell order: lower baseline side start, lower baseline side end, upper side end, upper side start

Return values

1 on success, or 0 with zero outputs for an invalid handle or index

Remarks

The quad preserves arbitrary rotation, shear and reversed baselines and includes the font descent below a horizontal baseline

Identity-V cells follow the column baseline, using the vertical advance and horizontal glyph width. These are extraction cells rather than pixel-tight glyph outlines; W2 position vectors can place painted glyphs beyond a cell

Type3 cells use the horizontal text advance and the transformed FontBBox height. Rotated or offset glyph artwork can extend beyond these extraction cells

See also

GetTextBlockCharLooseBox, DAGetTextBlockCharQuad