program ImageDemo;

{$APPTYPE CONSOLE}

uses

SysUtils,

Graphics,

Classes,

HPDFDoc;

 

var

I: Integer;

HPDF: THotPDF;

Index: Integer;

 

begin

HPDF:= THotPDF.Create( nil );

try

HPDF.AutoLaunch := true;                     // فایل PDF به طور خودکار نشان داده خواهد شد

HPDF.FileName := 'ImageDemo.pdf';

 

HPDF.BeginDoc;                   // ایجاد فایل PDF

 

Index := HPDF.AddImage( '.\Image.jpg', icJpeg );                     // Add image to the document

HPDF.CurrentPage.ShowImage( Index, 10, 10, 390, 300, 0 );   // Show image with sizes 390 x 300

 

HPDF.EndDoc;                      // بستن فایل PDF

finally

HPDF.Free;

end;

end.