This is the server-side component of <vcf-pdf-viewer> Web Component. The component uses PDF.js library to display pdf files.
This component is part of Vaadin Component Factory.
Pdf Viewer component provides support to the following features:
- Display a pdf file.
- Display a thumbnail's viewer.
- Set zoom.
- Navigate to a certain page.
- Open or close thumbnail's viewer.
- Add a listener on change page when clicking on thumbnail.
- Download the pdf file.
From version 2.5.x:
- Printing the pdf file (implemented with Print.js).
- Build the project and install the add-on locally:
mvn clean install
- For starting the demo server go to pdf-viewer-demo and run:
mvn jetty:run
This deploys demo at http://localhost:8080
PdfViewer pdfViewer = new PdfViewer();
StreamResource resource = new StreamResource("example.pdf", () -> getClass().getResourceAsStream("/pdf/example.pdf"));
pdfViewer.setSrc(resource);
pdfViewer.openThumbnailsView();
add(pdfViewer);
You can report any issue or missing feature on GitHub.
Apache License 2.0.