-
-
Notifications
You must be signed in to change notification settings - Fork 908
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
IE11 not able to load PDFJS worker #560
Comments
Side note, 5.0.0-beta.2 works. But not seeing any text elements rendering. |
If you use beta.3 with forced version of pdf.js that was used in beta.2 ( |
Not using yarn. But going into the package.lock and making the change in pdf-js should be the same. Got the same worker error. Tried this as well. pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js` package.lock.json "react-pdf": {
"version": "5.0.0-beta.3",
"resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-5.0.0-beta.3.tgz",
"integrity": "sha512-+5JXiER6DDOiyCLvYjjLPyqTb1eKANFOS0v6IjxYXctC2uMG/jvD5wcTlqLlB2WAwgRtdcZYWZ2lyWDteRGvmw==",
"requires": {
"@babel/runtime": "^7.0.0",
"make-cancellable-promise": "^1.0.0",
"make-event-props": "^1.1.0",
"merge-class-names": "^1.1.1",
"prop-types": "^15.6.2"
},
"dependencies": {
"pdfjs-dist": {
"version": "2.2.228",
"resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.2.228.tgz",
"integrity": "sha512-W5LhYPMS2UKX0ELIa4u+CFCMoox5qQNQElt0bAK2mwz1V8jZL0rvLao+0tBujce84PK6PvWG36Nwr7agCCWFGQ==",
"requires": {
"node-ensure": "^0.0.0",
"worker-loader": "^2.0.0"
}
}
}
}, |
Also noting that the demo url http://projects.wojtekmaj.pl/react-pdf/ does not load for ie11. Error says Promise is undefined. So the demo url probably needs a polyfill. |
Faced the same error. Does react-pdf support ie11? |
It does, but IE11 doesn't support Promises. So you either need to add all necessary polyfills until it stops crashing, or configure Babel properly to do it for you. |
Facing issues with IE11 as well... I do think it needs to be a babel configuration problem... It appears that my webpack configuration is not compiling the When I look at the compiled code, it is still using es6 code which is why it's failing on IE11. It would be great if we could get an IE11 compatible config. |
Unfortunately, in v5, support for IE 11 has been dropped. There's nothing we can do about it. Sorry about that! If you still need to continue support IE 11, you're stuck at v4.x. See thread: #495 (comment) |
Before you start - checklist
Description
IE11 does not render PDFs with 5.0.0-beta.3 or latest version 4.1
Steps to reproduce
Steps to reproduce the behavior:
Also noting that with this library I have to add a worker SRC otherwise the PDF will not load.
Expected behavior
IE11 should load PDF js documents. Also noting that
@mikecousins/react-pdf
will load. So perhaps there is a method or configuration to support IE11 that is missing.Additional information
Environment
The text was updated successfully, but these errors were encountered: