PDFium Delphi Component Docs

GetTextRenderMode method

Component: TPdf  ·  Unit: PDFium
Read the text rendering mode of a text object

Syntax

function GetTextRenderMode(Index: Integer): Integer;

IndexInteger. Zero-based index of a text page object
ResultInteger. One of the FPDF_TEXTRENDERMODE_* values: FILL (0), STROKE (1), FILL_STROKE (2), INVISIBLE (3), FILL_CLIP (4), STROKE_CLIP (5), FILL_STROKE_CLIP (6), CLIP (7)

Description

The rendering mode (ISO 32000-1 9.3.6) decides whether a text object is filled, stroked, used as a clip, or drawn invisibly. Reading it is what separates visible text from the invisible layer an OCR pass leaves behind

Invisible text still extracts through Text, so a caller that wants only what a reader can see has to filter on this mode

The value comes from PDFium and is returned as an integer rather than an enumeration, matching the FPDF_TEXTRENDERMODE_* constants declared in the FPdfView unit

See Also

GetObjectText, ApplyOcrSearchLayer, PageObjectInfo, CharacterInfo