Closed Bug 1516968 Opened 5 years ago Closed 5 years ago

Some PDF files are garbled and show boxes instead of characters

Categories

(Firefox :: PDF Viewer, defect)

64 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 66
Tracking Status
firefox-esr60 --- unaffected
firefox64 --- wontfix
firefox65 --- fixed
firefox66 --- fixed

People

(Reporter: janne, Assigned: bdahl)

References

Details

(Keywords: regression)

Attachments

(1 file)

PDF files from https://www.vero.fi/omavero service show up incorrectly since Firefox 64. The characters are replaced by boxes with numbers inside them.

The PDF files are dynamically generated and include personal information such as social security numbers so unfortunately I can't attach a sample here.

Bisection tells the problem was introduced by https://bugzilla.mozilla.org/show_bug.cgi?id=1489996

A screenshot showing the new incorrect rendering:
https://i.imgur.com/bYENNT6.png

This is what it should look like and what it looks like in Firefox 63:
https://i.imgur.com/qpWrDuK.png

And in case it helps Adobe Acrobat Reader's properties show the following font configuration:
https://i.imgur.com/cMi0ACL.png

The PDF version of the files is 1.4.
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All

The fix for this has been merged into pdf.js master, Firefox's internal version will need to be updated.

Issue: https://github.com/mozilla/pdf.js/issues/10402
Commit: https://github.com/mozilla/pdf.js/commit/b81984f0cb8f4e1e1ac6878d74d7788c7a012ad1

(In reply to jbovatsek from comment #2)

The fix for this has been merged into pdf.js master, Firefox's internal version will need to be updated.

Unfortunately, there's no guarantee that the PDF document in comment 1 exhibits the same problem as the ones in comment 0 (since no test-case was provided there).

A question for Janne H, i.e. the original bug reporter:
Since this may have been fixed already, could you please either

Flags: needinfo?(cse)

I can confirm that Nightly displays the problem PDFs correctly.

Flags: needinfo?(cse)

(In reply to Janne H from comment #4)

I can confirm that Nightly displays the problem PDFs correctly.

Thanks for checking; resolving this as FIXED based on the above comment.

Status: NEW → RESOLVED
Closed: 5 years ago
Depends on: 1518139
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
Assignee: nobody → bdahl
Keywords: regression

This is a backport of the upstream commit against the mozilla-beta branch. Brendan, if you think this is worth taking, can you please nominate it for Beta approval? Thanks!

Flags: needinfo?(bdahl)
Attachment #9035062 - Flags: review+

Comment on attachment 9035062 [details] [diff] [review]
backport the upstream commit to Beta

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: Bug 1489996

User impact if declined: Some PDF's may not display text correctly.

Is this code covered by automated tests?: Yes

Has the fix been verified in Nightly?: Yes

Needs manual test from QE?: No

If yes, steps to reproduce:

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Only changes where an offset is read from, low risk of impact and well covered by tests in the pdf.js github repo.

String changes made/needed:

Flags: needinfo?(bdahl)
Attachment #9035062 - Flags: approval-mozilla-beta?

Comment on attachment 9035062 [details] [diff] [review]
backport the upstream commit to Beta

[Triage Comment]
Fixes issues with garbled characters with some PDFs. New automated tests checked in upstream. Approved for 65.0b10.

Attachment #9035062 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

(In reply to Brendan Dahl [:bdahl] from comment #7)

Is this code covered by automated tests?: Yes
Has the fix been verified in Nightly?: Yes
Needs manual test from QE?: No

Marking as qe-verify- since it's covered by automated tests.

Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: