ImageEn, unit iemio

TImageEnMIO.LoadFromFilePDF

TImageEnMIO.LoadFromFilePDF


Declaration

function LoadFromFilePDF(const FileName: string; Width: Integer = -1; Height: Integer = -1; const Password: string = ''): Boolean;


Description

Loads a PDF image or a multipage PDF into the attached TImageEnMView or TIEMultiBitmap using a plug-in.
You can optionally specify a size to load the PDF file to improve quality (the size will be automatically adjusted to maintain the aspect ratio).
If the file is encrypted you can specify the password (otherwise a password prompt will be displayed if AutoPromptForPassword is enabled).
Result will be false if the file is not PDF format or no PDF plug-ins are available (Aborting will be true). Loading errors due to a file not being available will raise an exception.

PDF loading requires one of the following plug-ins:
 ImageEn PDFium Plug-in from: www.imageen.com/download/
 WPViewPDF commercial plug-in
 ImageMagick + GhostScript

Note:
 PDF loading creates a rasterized image of each page
 LoadFromFilePDF is not compatible with SaveToFilePDF. If you save a file in this method each PDF page will be an image (e.g. text cannot be selected)
 Existing content is not cleared. Call Clear to remove existing content before loading
 To abort while loading set Aborting to true
 Read more about ImageEn PDF Support


Example

ImageEnMView1.Clear;
ImageEnMView1.MIO.LoadFromFilePDF('c:\test.pdf');