-
-
Notifications
You must be signed in to change notification settings - Fork 903
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
PDFs not rendering perfectly after Chrome update #1010
Comments
I see this problem on Edge (Chromium) as well. |
Any sample PDFs to reproduce this issue? BTW just landed #1019, this might fix it |
Do you have any idea when it will be released? :) thanks! |
@sborzova |
You can try render a pdf file with chrome and this will happen. looks like some white spaces under the words |
Is the fixed released? I am seeing the same issue. Several clients already complained |
I don't think so, I'm still having the problem too |
I have tried 6.0.0.3-beta - still have the issue. I am not getting it personally, but a guy in my team get it. the 6.0.0.3-beta version includes the change :( |
Seems to happen only on Edge for him @wojtekmaj I will try to check in the main lib |
It happens also to us, only to some colleagues of mine! |
the same to me,so how can I fix it? |
It is hard for me to reproduce this reliably (but from here reported working on pdf.js 2.7.570 which from a browse of the react-pdf releases would be react-pdf 5.3.2 (assuming 2.6.347 also does not have the issue). This obviously might introduce other issues, but could be worth a try. Using the "svg" render mode hack is not useful if you have images to display. |
facing the same issue. is there any fix available for the same? |
@rahulmahajannn nothing yet... :( |
Guys, If you're still experiencing this issue on v6, consider:
If you cannot update to v6 yet, you may also use e.g. Yarn resolutions to force PDF.js version (pdfjs-dist) to a certain version number. It appears that while React-PDF 5.7.2 originally shipped with PDF.js |
https://react-pdf.org/repl - this also looks bad for me disabling HW acceleration from the browser fixes this but you can't force a setting like this to all app users |
Hi, any updates regarding this issue? I am facing the same thing but no luck. |
@ilhamkaddourii Which React-PDF version are you using? |
@wojtekmaj i was on 5.4.0-beta.2 and then upgraded to 5.7.2. somehow v6 does not work for me, the image is not loaded at all |
5.x branch will forever stay this way. PDF.js both received important fixes for the latest browsers and some breaking changes preventing us from running it on legacy browsers. |
@wojtekmaj the new beta version is not working fine here. However, my team and I have noticed that the problem now is that on some computers this does not happen. It is working fine on mac devices and some lenovo laptops but on some dell laptops the experience is really bad. |
if anyone can explain why this happens so often? and without library change? how browsers update affect the render flow of pdfs? |
I am pretty sure this is the same issue and has some more detailed discussion |
same with 6.2.0 |
@wojtekmaj how i can use version 3 if am getting an error |
Hey @wojtekmaj Maybe if we add add here
It will fix it? |
Hi all! From all the testing and investigation I've done, the issue seems to be tied to having the following four things:
I have two different Windows ThinkPad laptops; one with a nVidia GPU and the other with the Intel Iris. I can only reproduce the issue on the Iris book, not the nVidia one. This goes in line with our clients' system specs, as well. I see @DonikaV pushed a potential fix, let me know if you'd like me to somehow test it on my affected machine (keep in mind it's a work laptop and enterprise security guidelines need to be respected). I know the test laptop I have can repro the issue, along with various affected PDFs I have from clients. Hopefully narrowing it down to GPU can help! |
Update from the other thread, which was Closed: I tried to reproduce on the affected machine with the following jsfiddle setups suggested by other users: I was unable to reproduce on my affected machine through jsfiddle, even after changing to various different fonts, sizes and displayed text. I've created some PDFs from Google Docs with various fonts to try other apps that use pdf.js to view documents. Surely enough, I can reproduce the blotchy text easily when trying out the demo page for pdf.js express: I also see the issue on the affected machine if I view the react-pdf demo page as another user pointed out: Keep in mind this only happens when four conditions are met from what I can tell:
|
No solution yet... BTW, from my debugging sessions with customers, it seems that it is fixable by zoom in |
For me it depends how big the document is. For example, if using the default demo doc on https://pdfjs.express/demo I need to fiddle with both the webapp zoom and browser zoom levels to completely fix it; each zoom control seems to change how characters are rendered. Also when in a document with multiple pages most webapps won't render the page until you scroll to it, which causes the user to need to re-zoom on each page. We also tried the suggested changes in our app from https://github.com/wojtekmaj/react-pdf/pull/1207/files however the changes did not fix all documents for the affected device. Something weird, I tried on https://mozilla.github.io/pdf.js/web/viewer.html (as well as the legacy viewer) and the issue does not occur here with the same documents and device. Seems tied to react-pdf and/or Chromium for sure. I made a thread for Chromium as well so they can look into it: |
Hi all, this issue seems to be resolved by the changes suggested here: Issue 1025 appears to be the exact same issue, from what I can tell. We first tried changes in the attached MR to this ticket: As stated in the comments, that only partially fixed the issue. The fix did cause a minor regression for all devices, though: The document flickers black when user zooms in or out. As this is very minor in comparison to the rendering issue, our internal team will likely move forward with our own fork of react-pdf with this fix. |
I investigated this and looks like while |
Can we fix this issue also for v5? |
@puppetmaster886 I'm nowhere near having enough capacity to support v6 the way I would want to, let alone v5. |
@wojtekmaj Issue is still happening to me |
@mleister97 I don't know if @react-pdf/renderer got updated with latest fixes. This is not a reliable source to test React PDF bugs. |
@wojtekmaj Sorry for bothering you. The issue is also happening using the latest react-pdf lib & pdf worker min js. But I figured something out, which may be helpful for you. The problem only occurs when chrome switches to energy-saving mode (didn't know chrome had such a thing). Using chrome with my laptop below 20% battery the rendering issue happens with 50% of my local tested pdf files. |
There were certain browser / system configurations that caused issues. See: wojtekmaj/react-pdf#1010 wojtekmaj/react-pdf#1025 (comment)
There were certain browser / system configurations that caused issues. See: wojtekmaj/react-pdf#1010 wojtekmaj/react-pdf#1025 (comment) Co-authored-by: Marcel Ellermann <Marcel.Ellermann@netfira.com>
Before you start - checklist
Description
After a chrome update the pdf no longer renders correctly. It looks like it cuts out some words. Several browsers have been tested and only chrome faces this.
Steps to reproduce
Just render a pdf and you'll see
Expected behavior
Don't render with cuts
Actual behavior
Rendering with cuts (white spaces between words)
Additional information
No response
Environment
The text was updated successfully, but these errors were encountered: