PDFBoxWrapper is a Class Module that use PDFBox to view PDF-documents.
The PDFBoxWrapper Class module need a Pane and a layout to show the PDF-document in the Pane. The Pane and the name of the layout must be specified as parameters to the initialize routine of the class.
The layout must contain a ScrollPane named "myScrollPane".
The layout can also optional contain:
The file pdfbox-app-2.0.14.jar must be in the additional libraries folder
The PDFBoxWrapper Class module and a working layout for the PDF-viewer can be obtained from the attached Example project.
To use the attached example you have to download the pdfbox-app-2.0.14.jar https://pdfbox.apache.org/download.cgi#20x and place it in the additional libraries folder.
The PDFBoxWrapper Class module need a Pane and a layout to show the PDF-document in the Pane. The Pane and the name of the layout must be specified as parameters to the initialize routine of the class.
The layout must contain a ScrollPane named "myScrollPane".
The layout can also optional contain:
- Spinner for scaleing the page ,named "SpinnerZoom"
- Spinner turning pages, named "SpinnerPageNumber"
- Button rotate pages 90degrees clockwise, named ButtonRotate
- Label for showing loaded PDF-document named "LabelFileName"
B4X:
#AdditionalJar: pdfbox-app-2.0.14.jar
The PDFBoxWrapper Class module and a working layout for the PDF-viewer can be obtained from the attached Example project.
To use the attached example you have to download the pdfbox-app-2.0.14.jar https://pdfbox.apache.org/download.cgi#20x and place it in the additional libraries folder.
Attachments
Last edited: