ImageEn, unit iexUserInteractions

PDFium PlugIn


PDFium is a Google library providing support for Adobe PDF files.

ImageEn uses PDFium to support PDF in two ways:

1. PDF Viewer

By enabling the PDFViewer property, you can view and manipulate files in a TImageEnView. The following features are supported:
- Scaling and auto-fit options
- View all pages at once
- Page and document rotation
- Editing of form fields
- Importing, deleting and moving of pages
- Saving of changed PDF files
- Selection of text and images with clipboard support
- Text searching and highlighting
- Page thumbnail viewer with one-click navigation
- Access to file attachments
- Keyboard shortcuts
- Web Link support




2. Rasterized PDF Loading

When the PDFium plug-in is available and registered, ImageEn can load PDF pages in the same way as multi-frame images.
For best quality you should load the page at the intended display size using LoadFromFilePDF or by specifying the auto-scaling properties.


Notes
- PDFium support requires Delphi/BCB 2009 or newer
- Download the PDFium plug-in from: http://www.imageen.com/download/
- It needs to be registered once by your application
- PDFium support requires Delphi/BCB 2009 or newer
- Specify which page to load using ImageIndex (between 0 and ImageCount-1) or use a TImageEnMView to load and display all pages


Demos

Demo  Demos\Other\PDFViewer\PdfViewer.dpr
Demo  Demos\Actions\Actions_PDFViewer\PdfViewerActions.dpr


Examples

// Register the PDFium Plug-In
IEGlobalSettings().RegisterPlugIns([ iepiPDFium ]);

// Display a PDF document (and allow text selection, scaled viewing, etc)
ImageEnView1.PdfViewer.Enabled := True;
ImageEnView1.IO.LoadFromFilePDF( 'C:\document.pdf' );

// Display a PDF page (as an image)
ImageEnView1.PdfViewer.Enabled := False; // Default is false anyway
ImageEnView1.IO.LoadFromFilePDF( 'C:\document.pdf' );

// Display third page of a PDF document
ImageEnView1.IO.Params.ImageIndex := 2;
ImageEnView1.IO.LoadFromFilePDF( 'C:\document.pdf' );

// Enable form editing
ImageEnView1.PdfViewer.Enabled := True;
ImageEnView1.PdfViewer.AllowFormEditing := True;
ImageEnView1.IO.LoadFromFilePDF( 'C:\document.pdf' );





// Allow user to select area of page and copy to clipboard (as an image)
ImageEnView1.PdfViewer.AutoSync := True;
ImageEnView1.PdfViewer.AllowTextSelection := False;
ImageEnView1.PdfViewer.AllowFormEditing := False;
ImageEnView1.MouseInteractGeneral := [ miSelect ];




// Display all pages of a PDF in a TImageEnMView
ImageEnMView1.MIO.LoadFromFilePDF( 'C:\document.pdf' );


See Also

- TIEPdfViewerInteraction
- PDFViewer
- LoadFromFilePDF