Table of Contents

TTMSFNCPDFGraphicsLibHTMLEngine.DrawHTMLText Method

Draws HTML-formatted text into a PDF rectangle and returns the bounding rectangle of the rendered content.

API unit family: TMSFNCPDFGraphicsLibHTMLEngine Declaring type: TTMSFNCPDFGraphicsLibHTMLEngine

Overloads

Overload 1

Draws HTML-formatted text into a PDF rectangle and returns the bounding rectangle of the rendered content.

class function DrawHTMLText(APDFLib: ITMSFNCCustomPDFLib; Text: UnicodeString; Rect: TRectF; ABitmapContainer: TTMSFNCBitmapContainer = nil; Paging: Boolean = False; AScale: Single = 1.0; Calculate: Boolean = False): TRectF; overload;

Parameters

Name Description
APDFLib The PDF library interface used for rendering.
Text The HTML string to render.
Rect The target rectangle in PDF units.
ABitmapContainer Optional bitmap container for resolving image references.
Paging When True, content is split across pages at the rectangle boundary.
AScale Scale factor applied to the rendered output.
Calculate When True, calculates layout without drawing; returns the content bounds.

Returns

Bounding rectangle of the rendered (or calculated) content in PDF units.

Overload 2

Draws HTML-formatted text starting at a point and returns the bounding rectangle of the rendered content.

class function DrawHTMLText(APDFLib: ITMSFNCCustomPDFLib; Text: UnicodeString; Point: TPointF; ABitmapContainer: TTMSFNCBitmapContainer = nil; AScale: Single = 1.0; Calculate: Boolean = False): TRectF; overload;

Parameters

Name Description
APDFLib The PDF library interface used for rendering.
Text The HTML string to render.
Point The top-left starting position in PDF units.
ABitmapContainer Optional bitmap container for resolving image references.
AScale Scale factor applied to the rendered output.
Calculate When True, calculates layout without drawing; returns the content bounds.

Returns

Bounding rectangle of the rendered (or calculated) content in PDF units.