Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdf viewer is not loading pdf file in case of all librbaries bundles into one lib.js #205

Closed
kalebakula opened this issue Aug 8, 2017 · 1 comment

Comments

@kalebakula
Copy link

Hi
In our aplication all the library files gets bundled into one lilb,js where pdf.js and pdf.worker.js also part of bundle

whenever we give valid url to $scope.pdfUrl, it looks for lib.worker.js because of this line return pdfjsFilePath.replace(/.js$/i, '.worker.js');
getting 404 not found since it is not present
If i comment this line and return pdfjsFilePath alone it works

Is this the only way to handle or any other configuration available

@dennybiasiolli
Copy link
Collaborator

dennybiasiolli commented Aug 8, 2017

Hi @kalebakula, I think you should put pdf.worker.js in a separate bundle file, take a look at this example of pdf.js: https://github.com/mozilla/pdf.js/tree/master/examples/webpack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants