program ParaDemo;

{$APPTYPE CONSOLE}

uses

   SysUtils,

   Graphics,

   Classes,

   HPDFDoc;

 

var

    HPDF: THotPDF;

ParaIndex: Integer;

 

begin

   HPDF:= THotPDF.Create(nil);

   try

      HPDF.AutoLaunch := true;

      HPDF.FileName := 'ParaDemo.pdf';      

      HPDF.BeginDoc;

 

      ParaIndex := HPDF.CreateParagraph( 20, jtLeft, 60, 60, 30, 30  ); // Create paragraph

      HPDF.ParaAutoAddPage := true;   // Paragraph will add new pages automatically

 

      HPDF.BeginParagraph( ParaIndex );                                        // Open  main paragraph

      HPDF.CurrentPage.SetFont( 'Arial', [fsBold], 14  );                    // Set the paragraph font

      HPDF.CurrentParagraph.Justification := jtCenter;                      // Set Center paragraph justification

      HPDF.CurrentPage.SetRGBFillColor ( clGray );

      HPDF.CurrentParagraph.ShowText( 'VCL component for Delphi for creating PDF documents.' ); // Print paragraph text

      HPDF.CurrentPage.SetRGBFillColor ( clBlack );

      HPDF.CurrentParagraph.NewLine;                                           // Line break

      HPDF.CurrentParagraph.NewLine;                                           // Line break

      HPDF.CurrentParagraph.Justification := jtLeft;                          // Set Left paragraph justification

      HPDF.CurrentParagraph.ShowText ( 'HotPDF is PDF Creation Library for Delphi & C++Builder.' ); // Print paragraph text

      HPDF.EndParagraph;                                                             // Close current paragraph

 

      HPDF.EndDoc;

   finally

       HPDF.Free;

   end;

end.