GetTextBlockCharOrigin

Text, Extraction, Geometry

Description

Returns the baseline origin of one extracted character after applying the selected document origin and scale

Syntax

Delphi

Function TPDFlib.GetTextBlockCharOrigin(TextBlockListID, Index, CharIndex: Integer; Out X, Y: Double): Integer;

Parameters

TextBlockListIDHandle returned by ExtractPageTextBlocks
Index1-based text block index
CharIndex1-based character position
X, YReceive the transformed baseline origin

Return values

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

Remarks

The next character origin normally equals the current origin plus the baseline advance returned in M11 and M12 by GetTextBlockCharMatrix

For Identity-V text, the baseline origin is origin 1 in the vertical writing coordinate system, including text rise. Glyph painting applies the separate origin-0 position vector from W2 or the DW2 defaults

For Type3 text, origin 0 includes the FontMatrix translation and text rise. Character advance remains horizontal in text space even when FontMatrix rotates or shears the glyph artwork

See also

GetTextBlockCharMatrix, DAGetTextBlockCharOrigin