THotPDF Class

THotPDF

메서드         속성      개요

맨 위  이전  다음

THotPDF is the main class used to create and manage PDF documents.

 

유닛

HPDFDoc

 

설명

Application에서 PDF document를 생성하려면 THotPDF를 사용하십시오. Document generation은 BeginDoc 호출로 시작됩니다. Drawing 및 text output은 CurrentPage property를 통해 수행되며 AddPage method로 추가 page를 만들 수 있습니다. Application이 EndDoc을 호출할 때까지 PDF는 open 상태로 유지됩니다

 

THotPDF property를 사용해 metadata, output option, compression, security, viewer behavior를 구성하십시오. 예를 들어 PDF encryption 및 permission은 ActivateProtection property로 제어됩니다

 

사용 예:

 

uses

  ...

  HPDFDoc,

  ...

 

type

   ...

   HPDF: THotPDF;

   ...

 

procedure TForm1.HelloWorldButtonClick(Sender: TObject);

begin

   HPDF.AutoLaunch := true;                                          // Show the PDF after it is created

   HPDF.FileName := '.\HelloWorld.pdf';

   HPDF.BeginDoc;                                                       // Start PDF generation

   HPDF.CurrentPage.TextOut(10, 10, 0, 'Hello World!');  // Write text on the first page

   HPDF.EndDoc;                                                         // Finalize and save the PDF

end;