Some test text!

Client only

Client-side JavaScript: viewing PDFs, MS Office & images files

Using WebViewer it's possible to view, edit and manipulate PDF and Office documents directly in the client without a conversion step on the server. WebViewer takes advantage of the latest browser technologies (for example WebAssembly) to render and manipulate documents completely on the client side.


Using the client only mode allows you to leverage the power of PDFTron rendering in the browser. Since no work is being done on the server this allows you to easily scale up the number of concurrent users without paying for more servers. The trade off is that a limited set of filetypes can be viewed (currently .pdf, .docx, .xlsx, .pptx, .md, .png, and .jpeg).


To instantiate WebViewer in client only mode simply pass the URL to a PDF or Office document to the initialDoc parameter and do not pass the webviewerServerURL option.

  licenseKey: 'Insert commercial license key here after purchase',
  initialDoc: 'YOUR_FILE.pdf',
}, viewerElement);

Full PDFTron API

The full PDFTron API is also available on the client side and includes basically all of the native PDFTron API functions. This API can be used to process documents outside of the viewer as seen in these samples .

To enable this API when using the viewer pass in the fullAPI option to the WebViewer constructor. For example:

  licenseKey: 'Insert commercial license key here after purchase',
  initialDoc: 'YOUR_FILE.pdf',
  fullAPI: true
}, viewerElement);

The reason this option needs to be specified is because the scripts required to be downloaded for the full API are ~2-3 times larger than what is required for the viewer only. If you only want to view PDF documents and won't take advantage of the other PDFTron functions then you shouldn't pass the fullAPI option.

See more information about the full API here .

Browser support

ChromeFirefoxSafariEdgeInternet ExplorerAndroid ChromeMobile Safari
*IE's JavaScript engine is slow compared to more modern browsers and this can impact performance

Get the answers you need: Support

Upcoming Webinar: Live tech update & run-through: Redaction | March 31st at 11 am PT


The Platform


© 2022 PDFTron Systems Inc. All rights reserved.


Terms of Use