PdfTron Salesforce Integration

WebViewer Version:
8.6.0
Do you have an issue with a specific file(s)?Pdf, Docx
Can you reproduce using one of our samples or online demos?No
Are you using the WebViewer server?No
Does the issue only happen on certain browsers?No
Is your issue related to a front-end framework?No
Is your issue related to annotations?No

Please give a brief summary of your issue:
I integrated Webviewer for Salesforce following the steps mentioned in the video but after deploying the static resources and lwc to the scratch org, I’m unable to use Webviewer . I can’t view pdf files . It throws an error in portal : Worker encountered an error and in console I can see that it says Error: Failed to find PDF worker files. This project is not set up to work with PDF files.

Please describe your issue and provide steps to reproduce it:
The issue is that I can’t use any of PdfTron’s feature because the file doesn’t load. It works when I upload a jpg or png file but they can’t be redacted or downloaded. I followed the steps in the Salesforce integration guide video.

Attaching link of the video showing the issue : pdftron.mp4

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi reet.roy, welcome to the PDFTron community.

The errors you are seeing in your video are related to WebViewer not being able to locate PDF worker files which are required for rendering/redaction of your document.

To debug this, please check the Network tab in your browser console (you might need to refresh to see all requests). You should see some failed requests (status code 404) - please click on them and see what the request URL is. Make sure that your static resources includes the requested URL. If the resources are not uploaded, make sure to add them to static resources.

Also, make sure you check the request URL for /lean/ or /full/ which indicates full or lean API. You can set fullAPI to true or false in the WebViewer constructor of your LWC component, and need to make sure the corresponding resources are available (ie when settin fullAPI: true, make sure you generate the workers in the NPM script and answer y to fullAPI).

Hope that helps, let us know if you have any other questions.

Thanks,
Thomas