THotPDF.Create Method

 

THotPDF.Create Method

THotPDF

 

Atas  Sebelumnya  Berikutnya

Membuat instance THotPDF

 

Delphi syntax:

constructor Create( AOwner: TComponent ); override;

 

C++ syntax:

__fastcall virtual THotPDF( Classes::TComponent* AOwner );

 

Deskripsi

Panggil Create untuk membuat objek THotPDF saat runtime. Konstruktor mengalokasikan instance komponen dan menginisialisasi pengaturan dokumen default yang dipakai untuk pembuatan PDF berikutnya

 

Contoh kode


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;

 

Lihat juga: Destroy