Documentation
Guides
Included in this package are two guides:
API Reference
Also available are the API References for WebViewer and each of its viewers
-
WebViewer.js: This API reference details how to use the WebViewer.js viewer wrapper.
Developers can refer to this API reference for integrating WebViewer with their own applications. -
WebViewer HTML5: This API reference details how to use the DocumentViewer component, as well as the full-featured and customizable ReaderControl.
Developers can refer to this API reference for making customizations to the HTML5 WebViewer.
Getting Started
To get started, convert your documents to the web-optimized XOD file. Choose from one of the following options:
- DocPub CLI: a command-line tool that converts documents to XOD
- PDFNet SDK with WebViewer add-on: the full PDFNet SDK for working with PDF files and exporting them to XOD
For more information, please visit http://www.pdftron.com/webviewer/getstarted.html
Once you have converted your documents to XOD files, all you need to do is pass your XOD file URL to the WebViewer. The most basic usage of WebViewer is as simple as this:
<script> var myWebViewerContainer = document.createElement("div"); var myWebViewer = new PDFTron.WebViewer({ initialDoc : "path/to/xod" }, myWebViewerContainer); </script>
For PDF documents it's just as simple. See the Getting Started tutorial for more information.