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 app. There are three major components to this solution:
WebViewer delivers consistent and reliable document viewing across modern browsers using HTML5 technology. For document viewing only, the WebViewer does not require any server-side scripting. The document files can be served directly from any static Web server.
The provided viewer can be used as is or it can be customized using WebViewer's comprehensive API. You can check out the samples to see some examples of WebViewer customization.
WebViewer supports two document engines. The Universal engine supports viewing virtually all document types once they've been converted to a web optimized format. This conversion typically takes place on a server.
Alternatively, the PDFNetJS engine can view PDF and Office documents directly, without a conversion step. There are benefits to both approaches in different situations which are outlined below.
WebViewer will generally still work in other browsers but most testing is done in the browsers listed above.
Using PDFNetJS as the document engine allows you to leverage the power of PDFNet rendering in the browser. When using this engine there is no server-side conversion of documents required. The trade off is that a limited set of filetypes can be viewed (currently .pdf, .docx, .xlsx, .pptx, .md, .png, and .jpeg).
Viewing PDF or Office files when using PDFNetJS requires a license key to be specified when creating the viewer. Without a license, you will be prompted to register for a demo license key and a demo stamp will be applied to the document.
The full version of PDFNetJS includes basically all of the native PDFTron API functions. The reason there is a separate full version provided is because the file size is significantly larger.
If you only want to view PDF documents and won't take advantage of the other PDFNet functions then you should use the non-full version for a faster load time and less memory usage. You can download the full version here.
Using the Universal engine allows many different file formats to be viewed as long as they are converted to a web optimized XPS file called XOD. The XOD conversion step performs optimizations on the file which allows fast and accurate rendering on both desktop and mobile devices.
For more information about Universal WebViewer and XOD document conversion see here.
WebViewer is compatible with any server stack that you might be using, including any on-premises, cloud, or combination of. You have full control over where WebViewer and your documents are hosted.
You may not need a server component if you're embedding WebViewer in a native app and reading the files from the local file system.
WebViewer provides support for rendering, creating and saving annotations. See the annotation saving and loading guide for more information about persisting them on your server.