-
-
Notifications
You must be signed in to change notification settings - Fork 906
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 render too small treating pts as px #1219
Comments
+1 |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days. |
This issue was closed because it has been stalled for 14 days with no activity. |
Please re-open this issue - I think the "actual size" is the better user experience default! At a minimum, we should have an option to specify it instead of being forced in the preview mode |
Please re-open this issue. After checking pdf metadata I can see that react-pdf is treating pts as pixels thus causing the document to not size correctly |
I'm reopening this as it indeed looks like we're not sizing PDFs correctly, although:
|
Until a fix is found you can multiply your desired scale by 1.33 to get actual document size |
This is my solution, currently in the v4 version is OK, have the same problem can try
|
Before you start - checklist
Description
Not sure if it's a bug or a feature. But when a PDF is rendered at default size using react-pdf, its size differs from the size when using PDF.js's "Actual size" option.
Specifically, react-pdf seems to take the values from the
view
property ofPDFPageProxy
and treat them as pixel, while they actually mean user points.Steps to reproduce
height
,width
,scale
.Expected behavior
They should have the same size. In particular react-pdf should consider that the values in
view
are user points and convert them to pixel appropriately.Actual behavior
react-pdf treats the values read from
view
as pixels.Additional information
No response
Environment
The text was updated successfully, but these errors were encountered: