-
-
Notifications
You must be signed in to change notification settings - Fork 915
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
react-pdf v6 does not work on safari ≤14.1 #1193
Comments
List of supported browsers was based on mozilla/pdf.js#14538, most recent update of the list of supported browsers in PDF.js v2.13.216 which was used at the moment of merging #988. Then, v2.14.305 was released with no updates to this list, and we updated PDF.js in React-PDF. This version was used until v6.0.0-beta.3, in v6.0.0-beta.4 we updated PDF.js to v2.16.105 (#1060). What I missed is that between versions v2.14 and v2.16 there was v2.15, where minimum browser versions were updated in mozilla/pdf.js#15028, and I missed this changelog altogether. Since we can't really roll back and v6 has been released already, I can only apologize, update README and advise to:
|
I had a feeling something like this had happened after checking out pdfjs' side of things. No worries @wojtekmaj. We'll figure something out :) |
A good starting point is Promise.allSettled polyfill from core-js and including Please keep me updated. I think getting this working in slightly older browsers is achieveable, crucial for 6.x adoption and should be documented. Your feedback here will be invaluable. |
Due to time constraints on upcoming releases and the fact that we run off a fork of react-pdf, I can only switch the used build back to legacy for the time being. That works fine of course. I made some light attempts at transpiling pdfjs. First stumbling block is |
any updates on when this would be fixed? |
Only solution is downgrade to 5 .. |
Never. Read #1193 (comment). You can either have support for older browsers, or the newer ones, not both. Sorry. |
Able to get react-pdf v6 work with safari == 14.1 by making using following are customisations
|
Before you start - checklist
Description
Recently migrated to react-pdf v6. Reading the readme, it seems it should work for Safari v12.1 and above. However I can only get it to work in Safari 15.6+. The images below are of the demo. I can also reproduce the same behavior in our app.
See screenshots in lower section.
Seems it is related to private names. Maybe a few changes in babel could help? Or could be a root pdfjs issue.
Steps to reproduce
Expected behavior
Pdf should render
Actual behavior
Pdf does not render
Additional information
Safari v12.1:

Safari v13.1:

Safari v14.1:

Safari v15.6:

Environment
The text was updated successfully, but these errors were encountered: