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;                     // O arquivo PDF será mostrado automaticamente

   HPDF.FileName := 'ImageDemo.pdf';    

 

   HPDF.BeginDoc;                   // Criar o arquivo PDF

 

   Index := HPDF.AddImage( '.\Image.jpg', icJpeg );                     // Adicionar a imagem ao documento

   HPDF.CurrentPage.ShowImage( Index, 10, 10, 390, 300, 0 );   // Mostrar a imagem com tamanhos 390 x 300

 

   HPDF.EndDoc;                      // Fechar o arquivo PDF

finally

     HPDF.Free;

end;

end.