PDF.JS Assistance

0
0

Hi,

Like so many other people here we’re trying to allow users to view documents and reports as PDF files using the PDFViewer control. However, sometimes we do need users to be able to see a document but not print or download. I know I can use pdf.js to do this but I’m having trouble integrating it into a WiseJ project.

Do you have any example projects demonstrating how to achieve this? I’m considering using an iFrame to load a separate site but this makes things a little messy.

Help!

Thank you,

Neil.

  • You must to post comments
0
0

Hi Neil,

The PdfViewer already uses Mozilla pdfjs,

Can use it from a CDN or locally if you set it on Custom and set the ViewerURL to the path of the viewer. The URL can use the placeholder [source] for the URL of the document source. i.e. ViewerURL=”/pdfjs.1234/web/viewer.html?file=[source]”
The url format depends on the viewer

Here’s a sample: https://drive.google.com/file/d/1ChA0zEi_qFyWNqYmrS2IBQsSYmSo9_OJ/view?usp=sharing

HTH,
Alaa

  • Neil Hoskins
    Thanks Alaa – that should give me food for thought :-)
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.