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 ); // Luo pääkappale

ParaIndex2 := HPDF.CreateParagraph( 20, jtLeft, 60, 60, 90, 30 ); // Luo kapea kappale

HPDF.ParaAutoAddPage := true; // Kappale lisää sivuja automaattisesti

HPDF.BeginParagraph(ParaIndex1); // Avaa pääkappale

HPDF.CurrentPage.SetFont('Arial', [fsBold], 14 ); // Aseta kappaleen fontti

HPDF.CurrentParagraph.Justification := jtCenter; // Aseta kappaleen tasaus

HPDF.CurrentPage.SetRGBFillColor(clGray);

HPDF.CurrentParagraph.ShowText('VCL-komponentti Delphille PDF-asiakirjojen luomiseen.'); // Tulosta kappaleen teksti

HPDF.CurrentPage.SetRGBFillColor(clBlack);

HPDF.EndParagraph;

HPDF.BeginParagraph(ParaIndex2); // Avaa kapea kappale

HPDF.CurrentPage.SetFont('Arial', [], 14 ); // Aseta kappaleen fontti

HPDF.CurrentParagraph.ShowText('HotPDF on PDF-luontikirjasto Delphille ja C++Builderille. HotPDF ei käytä DLL-tiedostoja tai muuta ohjelmistoa PDF-tiedostojen luomiseen. HotPDF-jakelu sisältää täydellisen ohjejärjestelmän ja monia demo-ohjelmia');

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; //Hae nykyinen tulostusrivi

HPDF.EndParagraph; // Sulje kappale

HPDF.EndDoc; // Close PDF file

finally

HPDF.Free;

end;

end.