GetHTMLTextWidth

Text, HTML text

Description

Returns the actual horizontal size of a block of HTML text when wrapped to a maximum

width by the DrawHTMLText function. See Appendix A for details of the supported HTML tags.

Syntax

Delphi

Function TPDFlib.GetHTMLTextWidth(MaxWidth: Double; Const HTMLText: WideString): Double;

ActiveX

Function PDFlib::GetHTMLTextWidth(MaxWidth As Double, HTMLText As String) As Double

DLL

double DLGetHTMLTextWidth(int InstanceID, double MaxWidth, const wchar_t* HTMLText);
double DLGetHTMLTextWidthA(int InstanceID, double MaxWidth, const char* HTMLText);

Parameters

MaxWidthThe width of the area the text would be drawn into
HTMLTextThe HTML text to determine the width of

Return values

Returns the actual horizontal extent of the HTML text when wrapped to MaxWidth, expressed in the document's current measurement units. Returns 0 when MaxWidth is not positive or HTMLText is empty.