Using Core without placing static assets in public directory

Product: PDFTron Core

Is it possible to use PDFTron Core without directly copying the static assets into the public directoy?

I understand that the common setup requires us to copy all the assets into the public or dist folder but our structure of the website is such that there the website communicates with multiple servers and gets files by requesting from servers as required.

I only need to use the core, so I was wondering if it would be possible to modify the webviewer-core.min.js such that I can directly import the worker js files instead of having to set the worker path.

Any possible way or sample repository would be highly appreciated, thanks in advance.

Hello nazim.shoikot,

Unfortunately it isn’t possible to do this right now because the worker files needed to use Core are loaded dynamically and there needs to be a reference set to where they exist.

This would be a useful feature; however, so we’ve added it to our backlog to be explored and possibly worked on in the future. We don’t have a timeline for when it will be available but if it does get worked on we’ll let you know when it’s available in an experimental build to test out and the estimated official release date.

Best Regards,
Carlo Mendoza
Software Developer
PDFTron Systems, Inc.
www.pdftron.com

1 Like