PdfTron Salesforce Integration

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

1 Like