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