THotPDF.BeginDoc Method

 

THotPDF.BeginDoc

THotPDF

 

ด้านบน  ก่อนหน้า  ถัดไป

สร้างเอกสารใหม่

 

Delphi syntax:

procedure BeginDoc ( Initial: boolean = false );

 

C++ syntax:

void __fastcall BeginDoc ( bool Initial = false );

 

คำอธิบาย

BeginDoc เริ่มต้นเอกสาร PDF ใหม่และสร้างหน้าแรก ในการใช้งานปกติ ให้เรียกใช้ BeginDoc ด้วยค่าพารามิเตอร์เริ่มต้นแล้ววาดลงบน CurrentPage

 

Code Example


HPDF := THotPDF.Create( nil );
try
  HPDF.FileName := '.\Output.pdf';
  HPDF.BeginDoc;   // Start PDF document creation
  HPDF.CurrentPage.TextOut( 100, 100, 0, 'Hello World!' );
  HPDF.EndDoc;     // Finish and save PDF document
finally
  HPDF.Free;
end;

 

ดูเพิ่มเติม: EndDoc