Some test text!


Get file data with WebViewer server

When using WebViewer Server, use the getFileData function to get a URL for downloading the document data. Afterward simply get a Blob object from the URL:

  .then(function(instance) {
    var docViewer = instance.docViewer;
    var annotManager = instance.annotManager;

    docViewer.on('documentLoaded', function() {
      var doc = docViewer.getDocument();
      var options = {
        annots: annotManager.exportAnnotations()

      doc.getFileData(options).then(function(data) {
        var xhr = new XMLHttpRequest();'GET', data.url, true);
        xhr.responseType = 'blob';
        xhr.onload = function(e) {
          if (this.status == 200) {
            var blob = this.response;
            // add code for handling Blob here
            // window.saveAs(blob, 'downloaded.pdf');

Get the answers you need: Support


Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.

PDFTron Receives USD$71 Million Growth Investment Led By Silversmith Capital Partners

Learn more