TImageEnIO.LoadFromStreamPDF
Declaration
function TImageEnIO.LoadFromStreamPDF(Stream: TStream; Width: Integer = -1; Height: Integer = -1; const Password: string = ''): Boolean;
Description
Loads a PDF from a stream into the attached
TImageEnView or
TIEBitmap 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 (unless
PdfViewer = True)
◼To manipulate PDF files, enable
PdfViewer
◼Use
ImageIndex to specify which page of the PDF file to load
◼LoadFromStreamPDF does not reset the position of the stream, so you may need to first call Stream.Position := 0;
◼Read more about
ImageEn PDF Support
See Also
◼PdfViewer
◼PdfViewerDefaults