In the _entry.noworker.js_ file there is this line:
const pdfjs = require('pdfjs-dist/build/pdf.combined');
However, the _build_ directory has been renamed to _dist_ and there no longer seems to exist a file named _pdf.combined.js_.
Related question: what would be the way to use v3.* without a worker? I know this is discouraged, but using a worker unfortunately is not an option on older _Windows_ browsers.
Thanks!
Hi,
are you sure it has been renamed? Still in pdfjs-dist repo there's /build folder.
3.0.x uses pdfjs-dist 2.0.305 fixed version which should work (noworker entry is used in CI testing so it'd fail if it was wrong). Maybe check if you have correct version installed?
Oh f* me... I'm am confusing things here. Too much going on.
However, I installed _pdfjs-dist_ v.2.0.487 and it no longer has a file named _pdfjs-dist/build/pdf.combined_. At least that part is accurate ;)
I'm running into a _pdfjs_ related problem with a part of my app that _doesn't_ use _react-pdf_ (but then another part _does_ depend on _react-pdf_), so I am not sure that downgrading to 2.0.305 is an option for me. Anyway, I'll try to figure it out. This can be closed.
You shouldn't use v.2.0.487. That's a pre-release. Mozilla is at the moment trying to fix this issue but what you see on npm is actually... Nightlies. Not stable versions.
react-pdf 4.0 will use stable 2.0.x version (full number not yet announced).
You shouldn't use v.2.0.487. That's a pre-release. Mozilla is at the moment trying to fix this issue but what you see on npm is actually... Nightlies. Not stable versions.
Really? How about that... Why don't they tag it accordingly (i.e. alpha, beta)??? Because npm update will just pull in the latest version now if you don't fix the version. Thanks for the heads up anyway.
That's exactly an issue. It will be fixed very soon. See mozilla/pdf.js#9440 for more details.
Ah, one more thing - please, please try to set it up with worker file. You'll save yourself the trouble with upgrading to 4.0 and you will provide much better performance for your customers.
That's exactly an issue. It will be fixed very soon. See mozilla/pdf.js#9440 for more details.
Nice one
And yes, I do have it set up to use with the worker and it certainly makes a big difference (especially on mobile). But I found there are edge cases (IE on Windows < 8.1) that do not work when loading a pdf from an URL if you enable the worker. Unfortunately I need to be able to support these as well, so I need to be able to dynamically switch off the worker for these edge cases.
Oh, you poor soul! 馃槺 Let me know if you're ever in Krakow, you'll get a beer on me 馃槀
馃槃 Yeah... Who knows, maybe I can convince my client to drop support for that old IE crap by the time v4 comes out. That has to happen some day anyway, better sooner than later.