THotPDF.BeginDoc Method

 

THotPDF.BeginDoc

THotPDF

 

Top  Previous  Next

Creates new document.

 

Delphi syntax:

procedure BeginDoc ( Initial: boolean = false );

 

C++ syntax:

void __fastcall BeginDoc ( bool Initial = false );

 

Description

BeginDoc starts a new PDF document and creates the first page. In normal usage, call BeginDoc with the default parameter value and then draw on 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;

 

See also: EndDoc