Question

Instellars Global Consulting Pvt Ltd
SG
Last activity: 30 Mar 2020 13:56 EDT
Need to access a third party javascript lib location in pega (pdftron Webviewer Integration)
We are trying to integrate pega with PDFtron software, Webviewer is a javascript library used to load pdf files in a client web browser.
Could you please suggest us.
Sample javascript
<script> WebViewer({ path: 'WebViewer/lib', // path to the PDFTron 'lib' folder on your server licenseKey: 'Insert commercial license key here after purchase', pdftronServer: 'http://XXXXX:9090/', // comment this out to do client-side only
initialDoc: 'https://XXXX/webviewer-demo.pdf', // initialDoc: '/path/to/my/file.pdf', // You can also use documents on your server
},
document.getElementById('viewer')) .then(instance => { const docViewer = instance.docViewer; const annotManager = instance.annotManager; // call methods from instance, docViewer and annotManager as needed
// you can also access major namespaces from the instance as follows: // const Tools = instance.Tools; // const Annotations = instance.Annotations;
docViewer.on('documentLoaded', () => { // call methods relating to the loaded document }); });
How to reference this lib folder location in pega?