Directory

← Back

WT PDF Viewer

Pdf viewer for Vaadin based on pdf.js web viewer

Author

Rating

Popularity

200+

Pdf viewer for Vaadin based on pdf.js web viewer.

Features:

  • Sidebar with thumbnails, document outline and attachments
  • Text search in PDF text
  • Previous page, next page and jump to arbitrary page
  • Zooming out up to 10%, automatic zoom, zoom to actual size, fit page, full width
  • Full-screen presentation Mode
  • Document print
  • Document download
  • Rotation clockwise and counterclockwise
  • Hand tool for comfortable scrolling
  • Document properties
  • Can show multiple pdf files on the same screen

Sample code

WTPdfViewer pdfViewer = new WTPdfViewer();

// get file stream
String filename = "some-pdf-file.pdf";
InputStream dataStream = getClass().getClassLoader().getResourceAsStream(filename);

// show file in pdf viewer
pdfViewer.setResource(new StreamResource(new InputStreamSource(dataStream), filename));

// jump to fifth page	
pdfViewer.setPage(5);

// boilerplate StreamSource implementation
class InputStreamSource implements StreamSource {

	private final InputStream data;

	public InputStreamSource(InputStream data) {
		super();
		this.data = data;
	}

	@Override
	public InputStream getStream() {
		return data;
	}

}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Better server side log from javascript error.

Released
2019-04-23
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 8.0+
Vaadin 7.0+ in 1.0
Browser
Firefox
Opera
Safari
Google Chrome
Internet Explorer

WT PDF Viewer - Vaadin Add-on Directory

Pdf viewer for Vaadin based on pdf.js web viewer WT PDF Viewer - Vaadin Add-on Directory
Pdf viewer for Vaadin based on [pdf.js](https://github.com/mozilla/pdf.js/) web viewer. **Features:** * Sidebar with thumbnails, document outline and attachments * Text search in PDF text * Previous page, next page and jump to arbitrary page * Zooming out up to 10%, automatic zoom, zoom to actual size, fit page, full width * Full-screen presentation Mode * Document print * Document download * Rotation clockwise and counterclockwise * Hand tool for comfortable scrolling * Document properties * Can show multiple pdf files on the same screen
Online