|
program HelloWorld; {$APPTYPE CONSOLE} uses SysUtils, Graphics, Classes, HPDFDoc; var HPDF: THotPDF; begin HPDF := THotPDF.Create(nil); try HPDF.AutoLaunch := true; // O arquivo PDF será exibido automaticamente HPDF.FileName := 'Rectangle.pdf'; HPDF.BeginDoc; // Cria o arquivo PDF HPDF.CurrentPage.Rectangle( 10, 10, 100, 100 ); // Draw rectangle and fill HPDF.CurrentPage.ClosePathEoFillAndStroke; HPDF.EndDoc; // Fecha o arquivo PDF finally HPDF.Free; end end. |