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) |
SelectionMerging | Merges closely aligned selections into single ones. Sometimes the words in PDF documents have widely spaced letters that show as multiple selections. If you specify a value other than zero for SelectionMerging, then selections that are less than that number PDF points apart will be merged into one | 3 |
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 and when displaying with 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
IEGlobalSettings().PdfViewerDefaults.DPI := 144; // PDF files are 72 DPI, so 144 is 200% size
ImageEnView1.IO.LoadFromFilePDF( 'C:\Test.pdf' );
// Do not show very close selections as a single selection
IEGlobalSettings().PdfViewerDefaults.SelectionMerging := 0;
ImageEnView1.Update();