About WebViewer

PDFTron WebViewer is a cross-platform solution that offers a seamless and effective way to embed viewing of PDF and other document formats directly within your Web application.

By converting all supported document types into a web-optimized XPS based file, called XOD, the WebViewer is able to deliver consistent results in viewing different document types. With the support of PDFNet's virtual printer driver, any document type that can be printed to a printer can be converted to a XOD file!

Alternatively using the power of PDFNet in the browser you can view PDF documents directly without conversion in modern desktop browsers!

PDFNetJS comes in two types: A lean version which includes only the APIs necessary for viewing and simple document manipulation. The full version of PDFNetJS is larger and includes all the PDFNet API functions. Make sure to download the version that best suits your purposes as the lean version will be much faster to load if you are just doing normal document viewing.

Supported Viewer Technologies
HTML5: IE9 and above, Firefox, Chrome, Safari, Opera
Mobile: Safari iOS 5 and above, Android 2.2 and above

What's Included

The WebViewer solution consists of a viewer wrapper (WebViewer.js) and WebViewer implementations (ReaderControl) for desktop and mobile browsers. WebViewer.js will detect users' browser environment and choose the best viewer technology to use.

WebViewer Package File Structure:
  • doc: documentation for WebViewer.js
  • lib: core WebViewer files, including the WebViewer.js script and built-in viewers
  • samples a collection of WebViewer samples
  • tutorials a collection of WebViewer tutorials


Components within WebViewer HTML5 Viewer:

The DocumentViewer is a control that provides the core features of document viewing. There are no menus or any other UI controls; this allows you to create drastically different UI layouts (e.g. your own custom flip page control.)
See: CoreControls.js

The HTML5 ReaderControl is a full-featured, customizable control that builds on top of DocumentViewer. Provided is a UI menu for navigation, as well as a side panel for display information like thumbnail previews and bookmarks. The ReaderControl has all the features that a user would expect from a document reading application.

The ReaderControl also provides a complete framework for annotations!

While it is recommended to use config files for any customizations, the source code for ReaderControl is publicly available and may be modified directly.
See: ReaderControl.js ReaderControl.html ReaderControl.css

The MobileReaderControl is an alternate ReaderControl based on HTML5 that is optimized for tablets and other mobile touch devices. This viewer provides the same core features of ReaderControl but presented in a different user interface that takes account of touch events and limited screen space.
See: MobileReaderControl.js MobileReaderControl.html

The PDFReaderControl is based on the desktop ReaderControl and uses the PDFNetJS backend to view PDF files directly in the browser without conversions. In addition, local PDF files can be opened and a copy of the PDF document with annotations can be downloaded.
See: PDFReaderControl.js