You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This wide PDF with a wide font is just because it makes it easy to see the problem on desktop, but I first noticed it in Android WebView with a normal PDF (where my phone enforces a minimum text size, and thus the text layer needs to be significantly scaled).
Web browser and its version
Firefox 133.0, but also seen in Chrome
Operating system and its version
Not relevat
PDF.js version
Latest
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
Open the above PDF
Set the zoom to 200%
Search for "40"
What is the expected behavior?
It finds a match, and it should show the match on screen.
If you scroll to 40 you'll see it highlighted (note that the text layer is misaligned by a few character in this example PDF, but assume that it was actually well aligned :P)
What went wrong?
It depends on the exact screen size, but I'm seeing only the numbers from 9 to 23.
Link to a viewer
No response
Additional context
This happens whenever there is a significant (either much larger than 1, or much smaller) scaleX applied to the text layer, because we compute the horizontal offset using .offsetLeft that does not take into account CSS scaling.
The text was updated successfully, but these errors were encountered:
Attach (recommended) or Link to PDF file
large_pdf_test-3.pdf
This wide PDF with a wide font is just because it makes it easy to see the problem on desktop, but I first noticed it in Android WebView with a normal PDF (where my phone enforces a minimum text size, and thus the text layer needs to be significantly scaled).
Web browser and its version
Firefox 133.0, but also seen in Chrome
Operating system and its version
Not relevat
PDF.js version
Latest
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
What is the expected behavior?
It finds a match, and it should show the match on screen.
If you scroll to 40 you'll see it highlighted (note that the text layer is misaligned by a few character in this example PDF, but assume that it was actually well aligned :P)
What went wrong?
It depends on the exact screen size, but I'm seeing only the numbers from 9 to 23.
Link to a viewer
No response
Additional context
This happens whenever there is a significant (either much larger than 1, or much smaller)
scaleX
applied to the text layer, because we compute the horizontal offset using.offsetLeft
that does not take into account CSS scaling.The text was updated successfully, but these errors were encountered: