-
Notifications
You must be signed in to change notification settings - Fork 2
Bug: page fit zoom calculation is wrong #21
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
Comments
Hi @xiaohanyu, thanks for the feedback. I wasn't able to reproduce this issue and want to confirm the React PDF version you're using. Also, would you mind sharing your code snippet on configuring the height of the container? Feel free to share it here or via david@react-pdf.dev. |
Hello @david-reactpdf , Let me give you another demo with the official next.js repo: xiaohanyu/starter-rp-next-ts@3c83eeb Demo: 2025-05-14-compressed.mp4The issue:
|
Meanwhile, another minor issue, sometimes Not sure why, though not a big issue for me. |
Another demo:
2025-05-14-12-compressed.mp4You can see that the issue still exist, page fit calculationi becomes page width when the height changes from pnpm dependency:
Let me know if you need further info, thank you and thanks for this excellent lib, keep on the good work. |
Thanks again for the detailed demo and context (super helpful!). Just wanted to let you know that the fix for the page fit recalculation issue is ready. Would really appreciate it if you could give it a test in your setup and let us know if the issue is resolved on your end. Thanks again for flagging this, and for the kind words! 🙏 |
Nice nice, would surely give the rc release a try, hold on! |
Just verified, it works as expected for page fit issue: 2025-05-30-compressed.mp4Thank you! As you can see, the CSS HMR still not working fully, it need an additional refresh to make the heigh update work, just FYI. |
Uh oh!
There was an error while loading. Please reload this page.
Let us align first,
page fit: zoom pdf to make sure that the height of the pdf paper fits 100% to the viewer's heightIt seems that react-pdf's page fit calculation is not very right when the height of the pdf viewer's container is close to
> 80vh
.Demo:
2025-05-10-compressed.mp4
The problem:
80vh
or more on a 27' screen (my hardware), page fit and page width option behaves the same, as a comparison, I show a working example on the right side of the demo.The text was updated successfully, but these errors were encountered: