ImageEn, unit iemio

TImageEnMIO.LoadFromStreamPDF

TImageEnMIO.LoadFromStreamPDF


Declaration


function TImageEnMIO.LoadFromStreamPDF(Stream: TStream; Width: Integer = -1; Height: Integer = -1; Password: string = ''): Boolean;


Description


Loads a PDF from a stream into the attached TImageEnMView or TIEMultiBitmap using either the TIEMiscPluginsImageMagick plug-in or the WPViewPDF commercial plug-in.
The result will be false if an error is encountered, e.g. the file in the stream is not PDF format or a PDF plug-in is not found(Aborting will be true).

If you are using the WPViewPDF commercial plug-in, you can optionally specify a size to load the PDF file and/or a password.

Notes:
- Existing content is not cleared
- PDF files are documents without specified pixel dimensions, so the Dpi is used to calculate image dimensions based on the page size of the PDF.
- You can abort loading by setting Aborting to true
- LoadFromStreamPDF does not reset the position of the stream, so you may need to first call Stream.Position := 0;