GetTextBlockCharWidth

Text, Fonts, Extraction

Description

Returns the width of a particular character within the specified text block.

Syntax

Delphi

Function TPDFlib.GetTextBlockCharWidth(TextBlockListID, Index, CharIndex: Integer): Double;

ActiveX

Function PDFlib::GetTextBlockCharWidth(TextBlockListID As Long, Index As Long, CharIndex As Long) As Double

DLL

double DLGetTextBlockCharWidth(int InstanceID, int TextBlockListID, int Index, int CharIndex);

Parameters

TextBlockListIDA value returned by the ExtractPageTextBlocks function
IndexThe index of the text block. The first text block in the list has an index of 1.
CharIndexThe index of the character to retrieve the width of. The first character has an index of 1.

Return values

Returns the width of the character, scaled by the document scale factor into points. Returns 0 when TextBlockListID does not identify a valid text block list.