ImageEn, unit iemio

TImageEnMIO.SaveToFilePDF

TImageEnMIO.SaveToFilePDF


Declaration

procedure SaveToFilePDF(const FileName: string; SelectedOnly: Boolean = False);


Description

Creates a multipage Adobe PDF file with all images in the attached TImageEnMView or TIEMultiBitmap.
If SelectedOnly = True and the component is attached to a TImageEnMView then only the selected images are output.
The size of the page will be specified by PDF_PaperWidth and PDF_PaperHeight. Margins are specified by PDF_PageMargin.
Image position and size is affected by PDF_ImageOptions.

Notes:
- If an internal save error is encountered Aborting will return true. Saving issues due to insufficient write permissions and disk write failures will raise an exception.
- To abort while saving set Aborting to true
- Read more about ImageEn PDF Support


Example

// load a multipage TIFF and save it as a PDF file
ImageEnMView.MIO.LoadFromFile('C:\multipage.tiff');
ImageEnMView.MIO.SaveToFilePDF('D:\output.pdf');

// Save multi-frame image in TImageEnMView as PDF with "US Letter" paper size
ImageEnMView.MIO.LoadFromFile('C:\multipage.tiff');
for i := 0 to ImageEnMView1.MIO.ParamsCount - 1 do
begin
  ImageEnMView1.MIO.Params[i].PDF_PaperSize := iepLetter;
  ImageEnMView1.MIO.Params[i].PDF_Compression := ioPDF_JPEG;
  ImageEnMView1.MIO.Params[i].JPEG_Quality := 90;
end;
ImageEnMView1.MIO.SaveToFilePDF('D:\output.pdf');