ImageEn, unit iesettings

TIEGlobalSettings.PDFEngine

TIEGlobalSettings.PDFEngine


Declaration

property PDFEngine: TIEImagingEngine;


Description

Specifies which engine is used to load and save PDF documents.
Property Description
ieenAuto Automatically chooses ieenDLL if the PDFium DLL is found in the EXE folder, otherwise ieenNative (Saving) or ieenLegacy (Loading)
ieenNative Uses native loading code (Saving only)
ieenDLL Uses the PDFium DLL
ieenWIC N/A
ieenLegacy Checks for a plug-in such as GhostScript or WP Tools
ieenNone Format is not available


Note:
This has no effect for the PdfViewer, which always uses PDFium
ieenDLL requires you to ship the PDFium with your application
With ieenAuto, only the EXE folder is searched for relevant DLLs. For ieenDLL, the system path is also checked (or explicitly call RegisterPlugins)
ieenWIC is not supported

Default: ieenAuto (which uses ieenDLL if the PDFium DLL is available, otherwise ieenNative (for saving) or ieenLegacy (for loading)


Saving with Native vs PDFium

Both engines provide a similar result when saving, though each have some limitations.

Native Limitations:
Fonts cannot be embedded into the PDF (only PDF Standard Fonts can be used. Others will be substituted)

PDFium Limitations:
Meta-data is not saved (PDF_Title, PDF_Author, PDF_Subject, PDF_Keywords, PDF_Creator, PDF_Producer)


Examples

// Use PDFium to create PDF files
IEGlobalSettings().PDFEngine := ieenDLL;


// Load a PDF as a rasterized bitmap (using PDFium), add a watermark, and then save (natively)
IEGlobalSettings().PDFEngine := ieenDLL;
bmp.LoadFromFile( 'D:\document.pdf' );
bmp.Proc.TextOut( Align_Text_Horz_Center, Align_Text_Near_Bottom, 'www.ImageEn.com', 'Arial', 32, clRed, [fsBold] );
IEGlobalSettings().PDFEngine := ieenNative;
bmp.SaveToFile( 'D:\document_WM.pdf' );


See Also

ActivePDFEngine
ImageEnVersion.IELibVersionStr