PDFium Delphi Component Docs

SetTextObjectRenderMode method

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

Syntax

procedure SetTextObjectRenderMode(Index: Integer; RenderMode: Integer);

IndexInteger. Zero-based index of a text page object
RenderModeInteger. One of the FPDF_TEXTRENDERMODE_* values from FPdfView: 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. This setter changes it in place, so an existing text object can become a searchable but invisible OCR layer, an outlined heading, or a clipping path without rebuilding the object

The page must be active and the object referenced by Index must be a text object. A value outside FPDF_TEXTRENDERMODE_FILL through FPDF_TEXTRENDERMODE_LAST is rejected, as is FPDF_TEXTRENDERMODE_UNKNOWN

The text page is unloaded and the page is updated after the change, so subsequent text extraction and rendering see the new mode. The call requires the FPDFTextObj_SetTextRenderMode export of pdfium.dll

Saved paragraph metadata

Since internal v3.403.0, direct logical text, object membership and ActualText changes clear affected saved paragraph cluster tables Geometry, style and metadata-only changes retain tables and regenerate complete represented shared mark scopes across adjacent nonempty streams Mark list membership is local to the selected object, while exact shared declarations keep their identity The bundled DLLs isolate named-property parameter edits; native builds without detachment reject a table-affecting logical change before mutation

Read native character maps again after mutation or reload These low-level operations do not supply reviewed replacement semantics or repair arbitrary tagged ownership Use the batch semantic-edit policies when those values and bindings must be reviewed together See scope, ownership and remaining source-preservation limits

See Also

GetTextRenderMode, SetTextObjectFontSize, ApplyOcrSearchLayer, PageObjectInfo