GetHTMLTextWidth

文字、HTML 文字

描述

傳回一段 HTML 文字在最大寬度換行後的實際水平尺寸

寬度(由 DrawHTMLText 函式使用)。支援的 HTML 標籤細節請看附錄 A。

語法

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);

參數

MaxWidth文字要繪入區域的寬度
HTMLText要計算寬度的 HTML 文字

傳回值

傳回 HTML 文字依 MaxWidth 換行後的實際水平寬度,以文件目前度量單位表示。MaxWidth 不為正數或 HTMLText 為空時傳回 0。