PDFViewer¶
-
MacroModule
¶ author Marcus Barann
package FMEstable/ReleaseMeVis
definition PDFViewer.def keywords pdf
Purpose¶
Displays PDFs through an HTML page using mozilla’S PDF.js in a QWebEngineView.
Usage¶
The idea of this macro is to embed a PDF viewer in another panel. Add this macro to your macros internal network and use the MDL Panel control for the PDF viewer:
Panel {
module = PDFViewer
panel = pdfViewport
}
Limitations¶
Printing¶
- Printing is possible, but the print result does not have best quality. The reason is that the PDF is not directly printed, but the PDFjs library renders a PNG image that is printed. For example, this makes the text font look less sharp.
- Another issue is that the print dialog does not use the page size (e.g. US Letter, DIN A4) and layout (Landscape, Portrait) settings of the PDF document, so a user has to ensure that the correct settings are used.
- If the print dialog is opened very quickly after a PDF is loaded, then it may not respond and needs to be closed before another attempt can be made (observed on Ubuntu 18.04).
Download Button¶
The function of this button is currently not implemented.
Parameter Fields¶
Field Index¶
hasPDFLoadingError : Bool |
pdfLoadingError : String |
isPDFLoaded : Bool |
pdfViewerURL : String |
isPDFLoading : Bool |
preparePrinter : Trigger |
isViewerReady : Bool |
printerAvailable : Bool |
pageHeightInInches : Float |
printingCancelled : Bool |
pageLayout : Enum |
toolBarVisible : Bool |
pageWidthInInches : Float |
useOwnJSLoggingCategoryFilter : Bool |
pdfFilename : String |