program ParaDemo;

{$APPTYPE CONSOLE}

uses

Graphics, SysUtils, HPDFDoc;

var

HPDF: THotPDF;

CurrntParaLine: Single;

ParaIndex1: Integer;

ParaIndex2: Integer;

begin

HPDF := THotPDF.Create(nil);

try

HPDF.FileName := 'ParaDemo.pdf';

HPDF.BeginDoc; // Create PDF file

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

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

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

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

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

HPDF.CurrentParagraph.Justification := jtCenter; // Set the 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.EndParagraph;

HPDF.BeginParagraph(ParaIndex2); // Open narrow paragraph

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

HPDF.CurrentParagraph.ShowText('HotPDF is PDF Creation Library for Delphi & C++Builder. HotPDF does not use any DLL or other software to create PDF files. The HotPDF distribution includes the complete help system and many demo programs');

HPDF.CurrentParagraph.ShowText(': PDF load and edit examples,PDF console application samples,PDF GUI application samples,server PDF application sample etc.');

CurrntParaLine := HPDF.CurrentParagraph.CurrentLine; //Get current print line

HPDF.EndParagraph; // Close the paragraph

HPDF.EndDoc; // Close PDF file

finally

HPDF.Free;

end;

end.