Some test text!

menu
How to load a tiff file?keyboard_arrow_down

How to load a TIFF file in WebViewer?

WebViewer requires the Full API to load a TIFF file. See this guide for how to setup full API.

You can then use the full API to manually create a document, add the TIFF image to the document and load the document in WebViewer:

WebViewer({
    path: 'lib',
    fullAPI: true,
  }, document.getElementById('viewer'))
.then(function(instance) {
  var PDFNet = instance.PDFNet;

  PDFNet.runWithoutCleanup(function() {
    //create an empty document
    return PDFNet.PDFDoc.create()
      .then(function(doc) {
        newDoc = doc;
        newDoc.initSecurityHandler();
        newDoc.lock();
        return PDFNet.Filter.createURLFilter("./files/test.tif");
      })
      .then(function(tiffFile) {
        return PDFNet.Convert.fromTiff(newDoc, tiffFile);
      }).then(function() {
        instance.loadDocument(newDoc);
      });
  });
});

Get the answers you need: Support

close

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.

Webinar: Integrate PDF/MS Office viewing & editing into Salesforce Lightning

Learn More
close