ImageEn, unit wpcubed_pdf_plugin |
|
TIEWPCubedPDF
Declaration
TIEWPCubedPDF = class;
Description
This class has been provided as interface to the WPViewPDF DLL to load PDF files as if they were image files with ImageEn.
To use this class you need to included the unit wpcubed_pdf_plugin.pas.
Usually wpcubed_pdf_plugin.pas registers the PDF support but it is possible to deactivate the auto-registration in wpcubed_pdf_plugin.pas using a compiler symbol. In that case please add this code to your application:
if TIEWPCubedPDF.Initialize then
TIEWPCubedPDF.RegisterPlugin
else
ShowMessage('PDF decoder DLL could not be found');
WPViewPDF will create a bitmap from a certain PDF page. The size will be either fit into the size provided using
LoadFromFilePDF or using the dpi setting provided by "PDF:Density" or
TImageEnView.Params.DPITIEWPCubedPDF will work with any edition of WPViewPDF. You can download a demo from:
www.imageen.com/WPPDF/Methods and Properties
| TIEWPCubedPDF.IsAvailable |
| TIEWPCubedPDF.RegisterPlugin |
Example
// Load the 3rd page of a PDF file with max dimensions of 1000x1000
TIEWPCubedPDF.RegisterPlugin(); // call only once!
ImageEnView1.ImageIndex := 2;
ImageEnView1.IO.LoadFromFilePDF( 'C:\Test.pdf', 1000, 1000 );