THPDFPage TextBox / TextOutBox / GetTextRowCount

傳回頂部

使用目前 font 與既有 HotPDF text metric functions,將文字放入固定 rectangles

Delphi 語法:

procedure TextBox(Rect: TRect; Text: AnsiString; Hor: THPDFJustificationType = jtLeft; Vert: THPDFTextBoxVerticalAlignment = tbvaTop);

function TextOutBox(X, Y, LineSpacing, BoxWidth, BoxHeight: Integer; Text: AnsiString; Align: THPDFJustificationType = jtLeft): Integer;

function GetTextRowCount(BoxWidth: Integer; Text: AnsiString): Integer;

TextBox 會以 horizontal 與 vertical alignment 輸出一行。TextOutBox 會將 words 包裝到提供的 width 內,直到 height 用盡,並傳回已消耗的 source characters 數量。GetTextRowCount 會依相同 wrapping rule 傳回 row count