Download CROSS-ORIGIN Error

32 views
Skip to first unread message

Francesco Perfetti

unread,
Apr 19, 2016, 12:56:09 PM4/19/16
to PDFTron WebViewer
hi guys,

is there a way to insert into webviewer header a corss-origin permission?

Thanks.

Francesco.

Anatoly Kudrevatukh

unread,
Apr 19, 2016, 1:02:48 PM4/19/16
to pdfnet-w...@googlegroups.com
Hello,

You can set customHeaders parameter in loadDocument function call. Your code will look roughly like this:

const options = {
      type: 'html5',
      path: 'lib',
      ...
    };
    this.webViewer = new PDFTron.WebViewer(options, viewerElement);

            this.webViewer.loadDocument(url, {
              customHeaders: {
                'field': 'val'
              }
            });

Francesco Perfetti

unread,
Apr 21, 2016, 5:23:52 PM4/21/16
to PDFTron WebViewer
Thanks:), I'll try your soon, another question, is possible download a zip of pdf fils by pdftron?
Thanks.
Reply all
Reply to author
Forward
0 new messages