GetWrappedTextLineCount

文字, 頁面版面配置

描述

依目前字型與文字大小,計算一段文字換行到指定寬度會佔幾行。可用 SetBreakString 函式設定斷行分隔符,預設是 CR / LF 成對出現

語法

Delphi

Function TPDFlib.GetWrappedTextLineCount(Width: Double; Const Text: WideString): Integer;

ActiveX

Function PDFlib::GetWrappedTextLineCount(Width As Double, Text As String) As Long

DLL

int DLGetWrappedTextLineCount(int InstanceID, double Width, const wchar_t* Text);
int DLGetWrappedTextLineCountA(int InstanceID, double Width, const char* Text);

參數

Width文字換行目標區塊的寬度
Text要換行的文字

傳回值

行數