|
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 ); // ドキュメントに画像を追加します HPDF.CurrentPage.ShowImage( Index, 10, 10, 390, 300, 0 ); // サイズ 390 x 300 で画像を表示します
HPDF.EndDoc; // PDFファイルを閉じます finally HPDF.Free; end; end.
|