Why is my signature data not displayed when I disable annotations?

22 views
Skip to first unread message

Euan Carmichael

unread,
Aug 15, 2018, 1:46:06 PM8/15/18
to PDFTron WebViewer
Q: Why is signature data within my document not being displayed in WebViewer?  We have setup our WebViewer instance as follows in order to prevent users from adding annotation data onto the document:

      var myWebViewer = new PDFTron.WebViewer({
        type: 'html5',
        path: '../../lib',
        //l: replace with your own license key and remove the samples-key.js script tag
        initialDoc: 'doc_url',
        documentType: 'pdf',
        documentId: getDocId('doc_url'),
        config: 'config.js',
        enableAnnotations: false,
      }, viewerElement);

A: The appearance of a signature within a PDF document is displayed as an annotation.  Disabling annotations within WebViewer in this way not only prevents users from adding annotations to the document but also prevents existing annotation data - such as signatures - from being displayed.  If you want signatures to be displayed but prevent users from adding their own annotations then you should instead use the enableReadOnlyMode option on the WebViewer constructor (https://www.pdftron.com/api/web/PDFTron.WebViewer.html#Options__anchor):

      var myWebViewer = new PDFTron.WebViewer({
        type: 'html5',
        path: '../../lib',
        //l: replace with your own license key and remove the samples-key.js script tag
        initialDoc: 'doc_url',
        documentType: 'pdf',
        documentId: getDocId('doc_url'),
        config: 'config.js',
        enableReadOnlyMode: true,
      }, viewerElement);

Reply all
Reply to author
Forward
0 new messages