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.
The engine used to save PDF files (either using
PDFium or ImageEn native code) is specified by
PDFEngine.
Note:
◼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
// 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; // or ioPDF_G4FAX for monochrome images
ImageEnMView1.MIO.Params[i].JPEG_Quality := 90;
end;
IEGlobalSettings().PDFEngine := ieenNative; // For compression support
ImageEnMView1.MIO.SaveToFilePDF('D:\output.pdf');
Compatibility Information
Prior to v13.2.0, ImageEn would always use native code to save PDF files. From v13.2.0, the saving engine is controlled by
PDFEngine. If the
PDFium DLL (iepdf*.dll) is located in the EXE folder, ImageEn will now default to using PDFium for saving. To avoid this, set IEGlobalSettings().PDFEngine := ieenNative;