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

add page change listener, angle change listener, download listener fix bug #8

Released
2017-09-08
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 8.0+
Vaadin 7.2+ in 1.0.0
Browser
N/A

PdfViewer - Vaadin Add-on Directory

PdfViewer PdfViewer - Vaadin Add-on Directory
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)
Online