Directory

← Back

PdfViewer

PdfViewer

Author

Rating

Popularity

100+

Wrapper for http://mozilla.github.io/pdf.js/

-Addon works on client side.
-Display file only with .pdf (pdf) format
-Supports multipage
-drag mode
-Provide only display mode (pdf as img)

-based on script http://mozilla.github.io/pdf.js/ -dragandscroll http://github.com/asvd/intence

Simple usage

 PdfViewer c = new PdfViewer(file);
 layout.addComponent(c);

Additional method

setPage(int i)
setPreviousPageCaption(String htmlCaption)
setNextPageCaption(String htmlCaption)
setPageCaption(String htmlCaption)
setToPageCaption(String htmlCaption)
setIncreaseButtonCaption(String htmlCaption)
setDecreaseButtonCaption(String htmlCaption)
setNextAngleButtonCaption(String htmlCaption)
setBackAngleButtonCaption(String htmlCaption)
setPrintButtonCaption(String htmlCaption)
setDownloadButtonCaption(String htmlCaption) 
setAngleButtonVisible(boolean visible)
setDownloadBtnVisible(boolean visible)

Sample code

PdfViewer p = new PdfViever(pdfFile);
layouts.addComponent(p);
setPreviousPageCaption(String htmlCaption)
setNextPageCaption(String htmlCaption)
setPageCaption(String htmlCaption)
setToPageCaption(String htmlCaption)
setIncreaseButtonCaption(String htmlCaption)
setDecreaseButtonCaption(String htmlCaption)
setNextAngleButtonCaption(String htmlCaption)
setBackAngleButtonCaption(String htmlCaption)	
setPrintButtonCaption(String htmlCaption)
setDownloadButtonCaption(String htmlCaption) 
setAngleButtonVisible(boolean visible)
setDownloadBtnVisible(boolean visible)
addPageChangeListener(PageChangeListener listener)
removePageChangeListener(PageChangeListener listener)
addAngleChangeListener(AngleChangeListener listener)
removeAngleChangeListener(AngleChangeListener listener)
addDownloadTiffListener(DownloadTiffListener listener)
removeDownloadTiffListener(DownloadTiffListener listener)

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

Released
2016-09-26
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.2+
Vaadin 8.0+ in 1.3.6
Browser
Firefox

Vaadin Add-on Directory

Find open-source widgets, add-ons, themes, and integrations for your Vaadin application. Vaadin Add-on Directory
The channel for finding, promoting, and distributing Vaadin add-ons.
Online