-
-
Notifications
You must be signed in to change notification settings - Fork 889
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
Black flash occurs when we zoom in using scale and rotate #1340
Comments
I'm experiencing the same error. |
Same issue |
same issue is there an update to this. Thank you |
same issue here |
using renderMode="svg" but the issue is if you use that renderMode="svg" for pdf that was scanned no text. the canvas become only white |
Fix is here though not sure if it will be merged #1279. |
Until @MattL75 pr is merged, this fixed it for me (basically what @MattL75 did): Add this to your component that renders the Page
and attach to Page
and make sure to add the ref to the container that holds the Document |
Great workaround for now! e.g. const onPageLoadSuccess = useCallback(() => {
hidePageCanvas();
}, [hidePageCanvas]); // hidePageCanvas instead of containerRef This provides a workaround for every kind of rerender by the way, it's not just relevant for scale/rotate operations. The black flicker affects simply switching pages as well, therefore is probably present in the majority of use-cases. |
@victorbojica @aseidma |
On my page I'm still using the svg version for that reason. On resize I get heavy flickering with canvas. |
If it helps someone, using commonJs import made the flickering go away for me, waiting for patch in the mean time: replace:
With:
|
This has already been addressed. Canvas was hidden during rendering in fc2ac76 and it shipped in v7.0.0-beta.3 |
I found a solution. I downloaded the script that we received using Now react-pdf works very fast and does not flicker. |
Hi, I'm using the latest version now but still got flickering issue, I've also tried your solution but the issue is still occurs, I received pdf file from BE side and then convert the response to base64 pdf file so I wonder if anyone here did the same flow as mine, here is some part of the code
hope someone can help |
Before you start - checklist
Description
Hi Team,
We can see Black flash when we zoom a document using scale or rotate.
We started getting this issue when we updated to latest version of react-pdf 6.2.2.
This was working fine with react-pdf 5.7.2
Steps to reproduce
Open the document using react-pdf
Zoom the document by using scale option of Page
Document flickers and black flash appears between zoom change
Expected behavior
Document should zoom smoothly
Actual behavior
Flickering occurs with black flashing between zoom change
Additional information
No response
Environment
The text was updated successfully, but these errors were encountered: