THotPDF.AddTiffFromFile

THotPDF

 

Top  Previous  Next

Adds a TIFF image to PDF document.

 

Delphi syntax:

procedure AddTiffFromFile ( FileName: TFileName; Compression: THPDFImageCompressionType; PaintType: TTIFFPaintType );

 

C++Builder syntax:

void __fastcall AddTiffFromFile ( AnsiString FileName, THPDFImageCompressionType Compression, TTIFFPaintType PaintType );

 

Description

Call AddTiffFromFile to decode a TIFF file and draw it on the current PDF page. The TIFF file can contain a single page or multiple pages. Compression selects the PDF image compression method, and PaintType controls whether HotPDF resizes the PDF page to the TIFF size or scales the image to fit the current page.

 

HotPDF 2.3.7 restores reliable Win32 decoding with the bundled libtiff 4.7.x object files, including the TIFFtoPDF demo scenario.

 

Code Example


HPDF := THotPDF.Create( nil );
try
  HPDF.FileName := '.\TiffOutput.pdf';
  HPDF.BeginDoc;
  HPDF.AddTiffFromFile( '.\Sample.tif', icJpeg, tptResizePage );
  HPDF.EndDoc;
finally
  HPDF.Free;
end;

 

See also: CurrentPage.ShowImage