pdf.js uses web workers:
<script type="text/javascript">
// Specify the main script used to create a new PDF.JS web worker.
// In production, change this to point to the combined `pdf.js` file.
PDFJS.workerSrc = '../../src/worker_loader.js';
</script>
but as I understand it web workers can't access anything outside of the url that the javascript file came from:
Can I load a web worker script from an absolute URL?
I'm hosting my site on AWS EC2, but serving my static files from AWS S3.
I therefore get an error when trying to run the equivalent of this line: PDFJS.workerSrc = '../../src/worker_loader.js'; that the .js cannot be loaded.
Have I understood the problem correctly, and if so, what options do I have to get around this?