Closed Bug 1903731 Opened 7 months ago Closed 7 months ago

PDF with non-integer DW is not rendered correctly

Categories

(Firefox :: PDF Viewer, defect, P1)

Firefox 127
defect

Tracking

()

VERIFIED FIXED
129 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox127 --- wontfix
firefox128 --- verified
firefox129 --- verified

People

(Reporter: erdal.alacali, Assigned: calixte)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Steps to reproduce:

Open an existing PDF document in Firefox

Actual results:

The PDF document is not displayed correctly, the fonts have different widths, therefore some parts of the PDF document are not displayed correctly, see attached screenshot file "Firefox-127-PDF-Screen.png".

Expected results:

The Firefox viewer should display the file correctly and display the font widths correctly.
Other browsers such as chrome, edge display the file correctly, and Firefox should also display it correctly.
Attached is the affected PDF file and the screenshots of the PDF viewers in question (in the browsers).
Further in the attachment you will find an info screenshot of the Firefox version.

The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → PDF Viewer

Same result as in Firefox in Evince 46.3/Poppler 24.02.
Cannot reproduce in xpdf 4.04, same result as in Chromium based browsers like Edge.

I don't see how that is a Firefox problem - that's rather whether fonts are embedded in the PDF or if not if they are available on your system and if not which font your system falls back to.

Status: UNCONFIRMED → RESOLVED
Closed: 7 months ago
Resolution: --- → INVALID

:Andre Klapper, why did you close this bug ?
For your information, the bug is in the pdf itself because a font uses a non-integer DW which must be an integer (because of the pdf specs).
But in considering that the rendering is correct in either Chrome or Acrobat, it's something we must fix in pdf.js.

Assignee: nobody → cdenizet
Severity: -- → S3
Status: RESOLVED → REOPENED
Ever confirmed: true
Priority: -- → P1
Resolution: INVALID → ---
Attached file 54428.pdf
Summary: PDFviewer → PDF with non-integer DW is not rendered correctly

As an additional information, the provided PDF file was good prior to Firefox version 127. Only after the update to 127, this has been perceived.

Could you try using https://mozilla.github.io/mozregression/ to figure out what caused the problem?

It's a regression from bug 1894705 and especially from:
https://github.com/mozilla/pdf.js/pull/18017

Regressed by: 1894705

Set release status flags based on info from the regressing bug 1894705

Status: REOPENED → RESOLVED
Closed: 7 months ago7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch

:calixte is there anything you can patch here in an uplift request for Fx28, or should this ride the train with Fx129?

Flags: needinfo?(cdenizet)
Attachment #9409535 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: Small
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: See comment#0
  • Risk associated with taking this patch: Very small
  • Explanation of risk level: One line and can easily be verified
  • String changes made/needed: no
  • Is Android affected?: no
Flags: qe-verify+

Having a non-integer default width is likely not so common, but in considering the complexity of the patch I think it's better to uplift it.

Flags: needinfo?(cdenizet)
Attachment #9409535 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Verified fixed using Beta 128.0b8 (20240625205049) and Nightly 129.0a1 (20240625213230) on MacOS 14, Ubuntu 24.04 and Windows 10.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: