You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please kindly check React-PDF v5.3.0-beta.2, in which improvements regarding loading PDF.js worker were made.
These changes should result in 10-15 seconds faster Webpack builds, as well as you should be able to use Webpack entry file in Create-React-App, without the need of using external CDN for hosting worker.
Before you start - checklist
What are you trying to achieve? Please describe.
Using pdf.js inside a WebWorker?
Describe solutions you've tried
I'm using pdf.js to generating images from pdf documents .
It works OK. But during the generating process, it's blocking the main thread which is causing some UI issues.
So then I want to move all the logic to a Web Worker to free the main thread.
But when running in the web worker, there is an error:
It's thrown from this function setupFakeWorkerGlobal
My guess is it can not load the
workerSrc
, so it has to use fake worker with throw error. :(I'd appreciate any helps.
Environment
The text was updated successfully, but these errors were encountered: