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

Open
#188 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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:
image

Select all in the LMS app on the first page:
image

To Reproduce
Steps to reproduce the behavior:

  1. Download PDF attached to this issue
  2. Open in Firefox
  3. Select all text
  4. Log in to the Hypothesis Canvas instance and navigate to https://hypothesis.instructure.com/courses/92/assignments/1583
  5. Open assignment
  6. Select all text
  7. 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:
image

LMS app Console in Chrome:
image

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.