The worker has encountered an error

Product:PDFTron

Product Version:8.5

Please give a brief summary of your issue:
When trying to load the pdf,getting the below error:


webviewer-core.min.js:193 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:
We are in the process of evaluating PDFTron product to our business. Tried to integrate to one of our salesforce orgs by following the steps:

Please provide a link to a minimal sample where the issue is reproducible:

Hello atallapragada,

These errors can occur when you are either missing worker files in your staticresources or if your worker files are mismatched. A good way to debug/confirm this is to switch to the Network tab in your browser console and look for any 404’s when requesting PDFTron workers.

If you do see a 404 make sure that the requested resource is available in your static resources. Also make sure that you are using full/lean API with the pdf_full or pdf_lean workers accordingly. If you want to rename your files or point the request endpoints at a different location, you can change your worker paths in your /staticresources/config_apex.js

If you do not want to configure these worker files yourselves, you can also try using one of our GitHub projects that include the worker files here: GitHub - PDFTron/salesforce-webviewer-attachments

If you would like to use an unmanaged package to deploy our demo/showcase, you can view steps here: PDFTron Salesforce Setup - WebViewer Showcase - YouTube

If you require assistance with any of these steps, feel free to reach out to support@pdftron.com, we can answer any specific questions or set up a quick meeting to go over these.

Thanks,
Thomas

Hi Thomas,

Thank you so much for the tip. I just tried to install the managed package.
For evaluation purpose, I have also installed Xodo WebViewer (Managed) on our sandboxes which is valid for 90 days however I am getting errors:

ANother question: Is there any size limit while editing the document or uploading the document?
Per Salesforce, the default limit for Salesforce Classic is 25MB. Support can increase the limit up to 65MB. Attachments larger than 36MB can be attached only via User Interface.
Is it the same with app or different?
Because found the below warning while one of our evaluations:
" Save files up to 3MB directly to your Salesforce org by clicking the save button or using Ctrl + S (Windows) or Cmd + S (macOS).

You can save larger files when storing documents outside of Salesforce or by creating a ContentVersion record via Salesforce’s REST API."

It is difficult to evaluate. Can you please guide us here?

Hello,

Yes, due to Salesforce governor limits there are some file size restrictions when using Salesforce’s internal file storage.

The bottleneck comes from the 6MB Heap size limit (12MB for async Apex). Due to having to convert the Salesforce blob to base64, we are losing around 33% (more info here: Base64 - MDN Web Docs Glossary: Definitions of Web-related terms | MDN - here is an example in the code where this conversion occurs: salesforce-webviewer-attachments/PDFTron_ContentVersionController.cls at main · PDFTron/salesforce-webviewer-attachments · GitHub )

We have worked with customers in the past that opted for external storage (f.e. AWS S3, Azure Files, Dropbox or other storage providers). This way, it is possible to work with file sizes around 2GB with integration to an external file storage (this comes with the caveat of requiring additional integration work and development resources).

If you would like to schedule a call, you can reach out to support@pdftron.com and request a meeting link with myself, happy to walk you through your technical questions / help resolve any errors you are facing during your evaluation period.

Best,
Thomas