-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Last line of PDF text on a page not selectable in the new PDF.js #1283
Last line of PDF text on a page not selectable in the new PDF.js #1283
Comments
Unsure, but maybe related to https://github.com/hypothesis/support/issues/226. |
From backlog meeting: In PDF.js - in FF dev tools you can find version of PDF.js. Get versions of FF and LMS app. Firefox 94 uses PDF.js: 2.11.298 |
Testing the "Jess" PDF from the issue description with PDF.js v2.13.153 in Chrome: In the cases where the selection doesn't cover the whole line, it still includes the correct text. However the position of text in the hidden text layer doesn't line up with the underlying content. This can be seen if changing the styling on the hidden text layer (here it has red text and a slightly-translucent white background): For contrast, here is the text layer from the version of PDF.js that we currently ship in Chrome: Testing in Firefox 97 with the same PDF.js version: Here is the text layer in Firefox: To test in Firefox I ran a local HTTP server with |
It occurs to me it would be quite useful to add a hidden "visualize PDF text layer" feature to the client for debugging purposes. What would be the best way to enable it? Keyboard shortcut? |
Here is the example from the "Tatum" PDF in 2.13.153. The main issue is fixed, although there are now some lines where the text layer doesn't align correctly with the content underneath. Similar to the issue with the other PDF it does have all of the content, but the horizontal sizing doesn't match. |
I started looking at this in the browser extension. See hypothesis/browser-extension#799. In the process I filed a client issue which we'll need to resolve first - hypothesis/client#4331. |
I'm currently working on a PDF.js update here: hypothesis/browser-extension#799. |
Open PRs that will close this: hypothesis/browser-extension#799 |
The new PDF.js version will bump the minimum supported browser version for the PDF viewer as described at mozilla/pdf.js#14538 to versions that are ~3 years old, which conveniently aligns approximately with our typical cut-off point for older browsers:
|
Describe the bug
From user ticket: https://app.hubspot.com/contacts/6291320/ticket/583626067/
User reports two PDFs that have issues selecting the last line of certain pages in the LMS app that don't have this problem in Firefox.
PDF 1 aka "Jess" had a problem at the last line of page 74.
PDF 2 aka "Tatum" had a problem with the last line of page 50.
In Firefox 92:

In the LMS app:
https://hypothesis.instructure.com/courses/258/assignments/2032

https://hypothesis.instructure.com/courses/258/assignments/2037

To Reproduce
Steps to reproduce the behavior:
Expected behavior
If possible it would be good to have the LMS app reflect what users can currently select using their web browsers.
The text was updated successfully, but these errors were encountered: