PDFium Delphi Component Docs

SetTextObjectFontSize method

Component: TPdf  ·  Unit: PDFium
Edits the native font size of one text object in place

Syntax

procedure SetTextObjectFontSize(Index: Integer; FontSize: Single);

Description

SetTextObjectFontSize writes FontSize into the native text object at Index, changing rendered size without approximating through a matrix transform

Call UpdatePage afterwards so the page scene and renderers pick up the change

Remarks

    • The call does nothing when the object is not a text object
    • For whole-object transforms use TransformPageObject; this method only rewrites the font size attribute

Example

Pdf1.SetTextObjectFontSize(ObjIdx, 14);
Pdf1.UpdatePage(1);

See Also