-
-
Notifications
You must be signed in to change notification settings - Fork 876
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
Wrong URL for PDF worker #254
Comments
You absolutely can! I can see you're starting with React-PDF so I suggest you to use 4.0.0 beta. Configuring it should be a breeze. You can pass configuration, including Have a look at the docs for it. It will link to further documentation on Mozilla's side. Let me know if anything about it is unclear. This package got too popular to have anything bad in documentation :) |
Hmm actually I couldn't get it to work. I also checked the related issues and couldn't get those fixes to work either. What's the actual option name? I'm using |
It's |
Just to clarify, you mean as a prop of the
For some reason it's not working for me… |
Did you set up your build so that you actually have If yes, check the Network tab in developer tools to ensure you're loading If no, check README for instructions for your bundler of choice. Side note: It's good to set |
Yes, the issue is the URL, not the file. The location in the Network tab is wrong, it's trying to load from So it seems like the option is not doing anything. |
(For now I copied Edit: that second error was due to a mistmatched version between the package and the |
So whatever value you put in workerSrc it does not change anything? Are you using 4.0 or 3.0 at the moment? |
Yep exactly, the setting seems not to be taken into account. And I'm using |
Sorry, I misinformed you. Please check updated instructions: https://github.com/wojtekmaj/react-pdf#browserify-and-others |
That seemed to work! Thanks! |
Hi All,
I can see the pdf.worker file getting loaded under network tab from cloud link (cdnjs.cloudflare.com). |
Before you start - checklist
Description
When I try to use this library, it tries to load the worker file relative to the current path ( so
http://localhost:3000/booking/pdf.worker.js
instead ofhttp://localhost:3000/pdf.worker.js
).Is there a way to specify that path or at least make it absolute? I'm running Meteor btw, so I can't use the Parcel or Webpack configs.
The text was updated successfully, but these errors were encountered: