PDFium Delphi Component 文件

SetText 方法

元件: TPdf  ·  單元: PDFium
在指定的頁面座標加入文字頁面物件

Syntax

procedure SetText(const Font: WString; FontSize: Double; X, Y: Double; const Text: WString; Color: TColor = clBlack)

Description

在指定的頁面座標加入文字頁面物件

傳入已向 PDF 註冊的字型名稱;點陣式註解請改用 AddImage

目前頁面的所有編輯都會先緩衝在 PDFium 的記憶體內部表示中。呼叫 UpdatePage 可重新整理算繪快取,呼叫 SaveToFile 則可儲存變更

Remarks

Example

begin
  if Pdf1.Active then
  begin
    Pdf1.MoveTo(100, 100);
    Pdf1.LineTo(200, 150);
    Pdf1.LineTo(200, 200);
    Pdf1.ClosePath;
    Pdf1.AddPath(clRed, 1.5, clYellow, fmWinding);
    Pdf1.UpdatePage;
  end;
end;

See Also

AddText, AddImage, AddPath