Regression from 4.2.0 to 5.2.0 in loading pdf from ArrayBuffer?
See original GitHub issueBefore you start - checklist
- [*] I followed instructions in documentation written for my React-PDF version
- [*] I have checked if this bug is not already reported
- [*] I have checked if an issue is not listed in Known issues
- [*] If I have a problem with PDF rendering, I checked if my PDF renders properly in Mozilla Firefox
Description
Short description of the bug you encountered.
Updating the version from 4.2.0 to 5.2.0 broke my code, but I couldn’t find anything about a breaking change in the doc.
Steps to reproduce
- get the pdf file content as
content
- return
<Document file={Buffer.from(content, 'binary').buffer}><pageNumber={1} /></Document>
- Try with v4.2.0 -> works
- Try with v5.2.0 -> failed to load pdf file
If it’s necessary I can try to create a project to reproduce
Expected behavior
What you expected to happen?
Should show the pdf in the last version
Additional information
If applicable, add screenshots (preferably with browser console open) and files you have an issue with to help explain your problem.
Environment
- Browser (if applicable) [e.g. Chrome 57, Firefox 59]: Firefox 86.0 (64 bits)
- React-PDF version [e.g. 3.0.4]: 5.2.0
- React version [e.g. 16.3.0]: 16.13.1
- Webpack version (if applicable) [e.g. 4.16.2]: 4.44.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Blog - Apache Cordova
Apache Cordova apps built for Android devices which allow the loading of http content from domains they do not control could be affected....
Read more >PDF-LIB · Create and modify PDF documents in any ...
Create PDF documents from scratch, or modify existing PDF documents. Draw text, images, and vector graphics. Embed your own fonts. Even embed and...
Read more >Changelog
Fixed a regression in 10.11.0 where the Launchpad no longer showed a loading spinner on startup to indicate that it had successfully started...
Read more >node packages | Corvid by Wix
csv-converter-to-pdf-and-html. 1.0.2. available. 12/28/2022 ... base64-arraybuffer ... 4.2.0. available. 05/03/2022. node-rate-limiter. 1.0.1. available.
Read more >Open Source Used In CloudCenter SA 5.2.4
1.1994.1 Available under license. 1.1995 python-cinderclient 4.2.0 ... 1.2595 postcss-load-config 2.0.0 ... 1.2631 safe-buffer 5.2.0.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wojtekmaj I’ve just tried with 5.1.0 and 5.0.0 to no avail. I’ll try to create a repro. I’m just not sure if I can do it this week. Thanks a lot 😉
Actually, I was using a non-matching version of pdf.worker.js. I’m still not sure on how and why. But using the mentioned import for webpack users quickly solved the issue: