ITMSFNCCustomPDFGraphicsLib.CalculateHTMLText Method
Returns the bounding rectangle of the specified HTML text at the given scale, without drawing.
API unit family: TMSFNCPDFGraphicsLib
Declaring type: ITMSFNCCustomPDFGraphicsLib
Overloads
Overload 1
Returns the bounding rectangle of the specified HTML text at the given scale, without drawing.
function CalculateHTMLText(Text: UnicodeString; Scale: Single = 1.0): TRectF; overload;
Parameters
| Name | Description |
|---|---|
Text |
HTML text to measure. |
Scale |
Scale factor applied to the text; 1.0 means no scaling. |
Returns
Bounding rectangle of the rendered text in PDF coordinate units.
Overload 2
Returns the bounding rectangle of the specified HTML text when constrained to the given rectangle.
function CalculateHTMLText(Text: UnicodeString; Rect: TRectF; Scale: Single = 1.0): TRectF; overload;
Parameters
| Name | Description |
|---|---|
Text |
HTML text to measure. |
Rect |
Maximum bounding rectangle for the text layout in PDF coordinate units. |
Scale |
Scale factor applied to the text; 1.0 means no scaling. |
Returns
Actual bounding rectangle used by the rendered text.