function TImageEnMIO.LoadFromStreamPDF(Stream: TStream; Width: Integer = -1; Height: Integer = -1; Password: string = ''): Boolean;
Loads a PDF from a stream into the attached TImageEnMView
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.
- Existing content is not
- 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
- LoadFromStreamPDF does not reset the position of the stream, so you may need to first call Stream.Position := 0;