Skip to content

drewharvey/vcf-pdf-viewer-flow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pdf Viewer component for Vaadin Flow

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.

Description

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).

Development instructions

  • 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

How to use it - Example

PdfViewer pdfViewer = new PdfViewer();
StreamResource resource = new StreamResource("example.pdf", () -> getClass().getResourceAsStream("/pdf/example.pdf"));
pdfViewer.setSrc(resource);
pdfViewer.openThumbnailsView();
add(pdfViewer);    

Missing features or bugs

You can report any issue or missing feature on GitHub.

License

Apache License 2.0.

About

Vaadin Addon for providing pdf viewing functionality

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 95.7%
  • JavaScript 3.6%
  • CSS 0.7%