Skip to content
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

Flickering issue when scaling the entire pdf #1760

Open
4 tasks done
ShashanKV98 opened this issue Apr 13, 2024 · 0 comments
Open
4 tasks done

Flickering issue when scaling the entire pdf #1760

ShashanKV98 opened this issue Apr 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ShashanKV98
Copy link

Before 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 PDF.js demo

Description

Hi. I had some issues when dealing with zooming a document with all pages in a column (not just a single page). I browsed the issues in this repo, and found a sandbox link from @wojtekmaj #875 (comment).

This was for a single page in the viewport, so I extended it to include all the pages. The first page seems to render just fine as I use the slider, but the rest of the pages tend to flicker a lot. I've been on this for days but couldn't figure out if this is because of React or page.render refreshing the entire page from scratch at every new scale value or something else that I'm missing.

I'm also curious about the recommended approach for handling zooming with this library. Is it possible to get it close to how pdf.js viewer handles zooming?

Thanks and appreciate the work put into this library.

Steps to reproduce

Attached a codesandbox link showing this behavior.

https://codesandbox.io/p/sandbox/react-pdf-prevent-flash-with-scale-forked-pwcw8z

Expected behavior

Flickering for all pages is supposed to be minimal to none

Actual behavior

The first page doesn't flicker but the subsequent pages do.

Additional information

No response

Environment

  • Browser (if applicable): Edge, Chrome
  • React-PDF version: 7.7.1
  • React version: 18.2.0
  • Webpack version (if applicable):
@ShashanKV98 ShashanKV98 added the bug Something isn't working label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant