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; // إنشاء ملف PDF

ParaIndex1 := HPDF.CreateParagraph( 20, jtLeft, 60, 60, 30, 30 ); // إنشاء الفقرة الرئيسية

ParaIndex2 := HPDF.CreateParagraph( 20, jtLeft, 60, 60, 90, 30 ); // إنشاء الفقرة الضيقة

HPDF.ParaAutoAddPage := true; // ستضيف الفقرة صفحات تلقائيًا

HPDF.BeginParagraph(ParaIndex1); // فتح الفقرة الرئيسية

HPDF.CurrentPage.SetFont('Arial', [fsBold], 14 ); // تعيين خط الفقرة

HPDF.CurrentParagraph.Justification := jtCenter; // تعيين محاذاة الفقرة

HPDF.CurrentPage.SetRGBFillColor(clGray);

HPDF.CurrentParagraph.ShowText('VCL component for Delphi for creating PDF documents.'); // طباعة نص الفقرة

HPDF.CurrentPage.SetRGBFillColor(clBlack);

HPDF.EndParagraph;

HPDF.BeginParagraph(ParaIndex2); // فتح الفقرة الضيقة

HPDF.CurrentPage.SetFont('Arial', [], 14 ); // تعيين خط الفقرة

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; //الحصول على سطر الطباعة الحالي

HPDF.EndParagraph; // إغلاق الفقرة

HPDF.EndDoc; // إغلاق ملف PDF

finally

HPDF.Free;

end;

end.