Custom server

In this document
chevron_rightBrowser support

If you don't want to use WebViewer Server as your document backend you can setup your own server to handle document viewing with WebViewer.


By converting a wide range of document formats into a web optimized XPS file, called XOD, WebViewer is able to deliver consistent results in viewing different document types.


To instantiate WebViewer with a XOD document simply pass the URL in the initialDoc parameter and do not pass the pdftronServer option. You do not need to pass a license key to WebViewer because the license key will be used on your server to convert the documents.

var myWebViewer = new PDFTron.WebViewer({
  initialDoc: 'YOUR_FILE.xod'
}, viewerElement);

linkUsing the PDFTron SDK for conversion on your server

You can use the PDFTron SDK on your Linux, Windows or macOS server to do XOD conversions. PDFTron also allows you to use more advanced features: for example apply your own watermark to all converted documents, add/remove pages to converted documents, merge annotations back to the original PDF.

Pre-converted XOD documents render very quickly on all devices. If you're unable to pre-convert your XOD files you can stream the conversion to start sending data to the client as soon as possible.

PDFTron is available on Linux, Windows and macOS. For more information, see here.

linkBrowser support

ChromeFirefoxSafariEdgeInternet ExplorerAndroid ChromeMobile Safari