PDFium Component Docs

เมธอด SetText

Component: TPdf  ·  Unit: 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