-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Text selection is not correct on hdpi #15229
Labels
Comments
calixteman
added a commit
to calixteman/pdf.js
that referenced
this issue
Jul 27, 2022
calixteman
added a commit
to calixteman/pdf.js
that referenced
this issue
Jul 28, 2022
Snuffleupagus
added a commit
that referenced
this issue
Jul 29, 2022
Fix text selection with hdpi screens (#15229)
rousek
pushed a commit
to signosoft/pdf.js
that referenced
this issue
Aug 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attach (recommended) or Link to PDF file here:
Configuration:
Steps to reproduce the problem:
I get:
My screen resolution is 3840x2160 and the global scale is 150%.
If I change the scale setting in
System > Display
to 100%, the selection is correct:The text is measured here:
pdf.js/src/display/text_layer.js
Line 695 in 8ebd2d3
and it returns the same value whatever the screen I use is.
So I think we must take into account the
window.devicePixelRatio
value when computing the text width.The text was updated successfully, but these errors were encountered: