ImageEn, unit iesettings

TIEImageEnGlobalSettings.PdfViewerDefaults

TIEImageEnGlobalSettings.PdfViewerDefaults


Declaration

property PdfViewerDefaults: TIEPdfViewerDefaults;


Description

Set key defaults for the PdfViewer and PDF loading methods when using the PDFium PlugIn.

Property Description Default Value
SelectionColor The color of selected text in the PdfViewer clElectricBlue ($00FE8E32)
HighlightColor The color of highlighted text when HighlightText is used clTangerine ($00328EFE)
FormFieldColor The color of all editable form fields when form editing is enabled clElectricBlue ($00FE8E32)
FormFieldAlpha The transparency of the form field color fill when form editing is enabled 25
Options Default value for Options [iepoAutoButtons, iepoAnnotations, iepoOptimizeForLCD]
DPI The scale to load pdf files when rendering to bitmap (does not affect PdfViewer) 72


Examples

// Don't draw annotations when rendering PDF files
IEGlobalSettings().PdfViewerDefaults.Options := IEGlobalSettings().PdfViewerDefaults.Options - [iepoAnnotations];

// Highlight form fields with yellow fill
IEGlobalSettings().PdfViewerDefaults.FormFieldColor := clYellow;
IEGlobalSettings().PdfViewerDefaults.FormFieldAlpha := 50;
ImageEnView1.PDFViewer.Update;

// Do not highlight form fields
IEGlobalSettings().PdfViewerDefaults.FormFieldAlpha := 0;
ImageEnView1.PDFViewer.Update;

// Update selection color
IEGlobalSettings().PdfViewerDefaults.SelectionColor := clRed;
ImageEnView1.Update();

// When rendering PDF files scale to double size
// Note: This assumes ImageEnView1.PdfViewer.Enabled = False, because the PdfViewer always outputs at full resolution of the display
IEGlobalSettings().PdfViewerDefaults.DPI := 144; // PDF files are 72 DPI, so 144 is 200% size
ImageEnView1.IO.LoadFromFilePDF( 'C:\Test.pdf' );