|
program Rectangle; {$APPTYPE CONSOLE} uses SysUtils, Graphics, Classes, HPDFDoc; var HPDF: THotPDF; begin HPDF := THotPDF.Create(nil); try HPDF.AutoLaunch := true; // فایل PDF به طور خودکار نشان داده خواهد شد HPDF.FileName := 'Rectangle.pdf'; HPDF.BeginDoc; // ایجاد فایل PDF HPDF.CurrentPage.Rectangle( 10, 10, 100, 100 ); // ترسیم مستطیل و پر کردن آن HPDF.CurrentPage.ClosePathFillAndStroke; HPDF.EndDoc; // بستن فایل PDF finally HPDF.Free; end; end. |