hypothesis / hypothesis/support-legacy
Spike: PDF has selectable text in PDF.js in Firefox and works as expected, but has very little selectable text in the LMS app
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Desired outcome of the Spike is:
- Learning why the PDFs work in pdf.js for Firefox but not in the LMS app. Is it because pdf.js in the LMS app is out of date? Is there something about these PDFs that we can tell faculty to watch out for?
- If we need to update pdf.js, what's the LOE?
Note: it is possible to run a version of pdf.js locally which matches the version of pdf.js that we serve with the LMS app. It's beyond the capabilities of the support team, though.
Describe the bug
A user has provided a PDF that is fully selectable in PDF.js in Firefox, but has a broken text layer (very little selectable text, sporadically arranged throughout the page) when viewed in the LMS app.
Select all in Firefox on the first page:

Select all in the LMS app on the first page:

To Reproduce
Steps to reproduce the behavior:
- Download PDF attached to this issue
- Open in Firefox
- Select all text
- Log in to the Hypothesis Canvas instance and navigate to https://hypothesis.instructure.com/courses/92/assignments/1583
- Open assignment
- Select all text
- Note difference in selectable text.
Expected behavior
While there is occasionally a difference in the selectable text available in Firefox and Chrome, in the past Firefox has been a good way for instructors to test a PDF before trying it out in the LMS app.
Screenshots
Firefox console:

LMS app Console in Chrome:

Desktop (please complete the following information):
- OS: Mac Mojave 10.14.6
- Browser Firefox 87.0
PDF file
Clare Goll & DH Lawrence combined for Hypothesis.pdf
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached PDF and reproduce the selectable-text difference in Firefox 87 and the LMS app at the linked Canvas assignment. Compare the PDF.js versions used locally and by the LMS app, then document the cause, any faculty-facing PDF guidance, and the effort required for an update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100