Hi Alex,
Thanks for bringing this up.
Are you using WebViewer through a npm package? It looks like we only included the optimize script in the manual download package, not the npm one.
A pull request that will fix this issue is under review, and the fix will be included in the next version.
The attached is the script that you can run using node to remove some unnecessary files in the lib folder depending on your usage. Note that you may need to change some paths in the script to make it work for your folder strucutre.
Another option would be downloading the package from https://www.pdftron.com/documentation/web/download/web/, unzip it, run npm install, then follow the link you posted. After it finishes, you can copy the files under the lib folder to your app.
Let me know how this works and if you have any other questions.
Best Regards,
Zhijie Zhang
Software Developer
PDFTron Systems.
optimize-for-prod.txt (12.2 KB)