Closed Bug 1777693 Opened 3 months ago Closed 2 months ago

Firefox Nightly 104.0a1 will not print pdf


(Firefox :: PDF Viewer, defect, P1)

Firefox 105



105 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- fixed
firefox103 --- unaffected
firefox104 --- verified
firefox105 --- verified


(Reporter: jclaba, Assigned: calixte)




(Keywords: regression, Whiteboard: [pdfjs-printing])


(4 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0

Steps to reproduce:

  1. Open any pdf with Nightly, viewer works.
  2. Click print icon, print preview is blank.
  3. Click print button, prints blank pages.

Actual results:

Updated Nightly, still prints blanks.
cleared printer settings in menu, same.
setup new profile, same.
Adjusted print settings, same.
System Dialog box shows print preview, still prints blanks.
Other browsers (including regular Firefox) work.
Other apps work.

Expected results:

Expected a normal print. This worked fine up to a couple of days ago. Hasn't worked since. I love Firefox, look forward to having this fixed, let me know if I can help.

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

Component: Untriaged → Printing
Product: Firefox → Toolkit

Is this for all PDFs? Printing the US Tax Return [1] document seems to work fine for me. Can you share the document that isn't working if it's a specific one?


Flags: needinfo?(jclaba)
Attached file 100-C_FS0_AC_DCE.pdf

Initially, it included all PDFs. It appears to be mostly corrected in the latest release, which I just downloaded (7-13-22). At least one kind of PDF still seems to be affected. They are the AutoCAD generated PDFs. These were not a problem prior to my report of the bug. I did them all the time because I work with ACAD daily. This PDF was generated with AutoCAD LT 2021 on 7-13-22.

Flags: needinfo?(jclaba)

The severity field is not set for this bug.
:mstriemer, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mstriemer)

Hey Calixte, have you seen this issue on the PDF side? Any idea if this is an issue there?

Flags: needinfo?(mstriemer) → needinfo?(cdenizet)

The console outputs:

TypeError: this.optionalContentConfig.isVisible is not a function
    beginMarkedContentProps resource://pdf.js/build/pdf.js:8544
    executeOperatorList resource://pdf.js/build/pdf.js:6947
    _next resource://pdf.js/build/pdf.js:4049
    promise callback*_scheduleNext resource://pdf.js/build/pdf.js:4040
    _continue resource://pdf.js/build/pdf.js:4030
    operatorListChanged resource://pdf.js/build/pdf.js:4017
    _renderPageChunk resource://pdf.js/build/pdf.js:2727
    pump resource://pdf.js/build/pdf.js:2767
    promise callback*pump resource://pdf.js/build/pdf.js:2754
    _pumpOperatorList resource://pdf.js/build/pdf.js:2797
    render resource://pdf.js/build/pdf.js:2451
    mozPrintCallback resource://pdf.js/web/viewer.js:14663
    promise callback*__webpack_modules__</composePage/canvas.mozPrintCallback resource://pdf.js/web/viewer.js:14645
    composePage resource://pdf.js/web/viewer.js:14638
    layout resource://pdf.js/web/viewer.js:14718
    beforePrint resource://pdf.js/web/viewer.js:1785
    dispatch resource://pdf.js/web/viewer.js:3516
    windowBeforePrint resource://pdf.js/web/viewer.js:1940
    triggerPrinting resource://pdf.js/web/viewer.js:1822
    webViewerPrint resource://pdf.js/web/viewer.js:2276
    dispatch resource://pdf.js/web/viewer.js:3516
    _bindListeners resource://pdf.js/web/viewer.js:13612
    _bindListeners resource://pdf.js/web/viewer.js:13600
    Toolbar resource://pdf.js/web/viewer.js:13548
    _initializeViewerComponents resource://pdf.js/web/viewer.js:751
    initialize resource://pdf.js/web/viewer.js:494
    run resource://pdf.js/web/viewer.js:790
    webViewerLoad resource://pdf.js/web/viewer.js:14977
    EventListener.handleEvent* resource://pdf.js/web/viewer.js:14985
    <anonymous> resource://pdf.js/web/viewer.js:14987
    <anonymous> resource://pdf.js/web/viewer.js:14989

So it's a pdf.js bug.

Severity: -- → S3
Component: Printing → PDF Viewer
Flags: needinfo?(cdenizet)
Priority: -- → P3
Product: Toolkit → Firefox
Whiteboard: [pdfjs-printing]
Version: Firefox 104 → Firefox 105
Ever confirmed: true
Assignee: nobody → cdenizet
Priority: P3 → P1

Given the fix is just a typo fix and the fact that AutoCAD generated PDFs are affected, I'd suggest uplifting the fix to 104.

Comment on attachment 9288456 [details]
Bug 1777693 - Fix printing of PDF containt some optional contents r=#pdfjs-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: Some users may encounter some printing issues with some pdfs containing some Optional Contents.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Print the pdf attached in this bug.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It's just a typo and the fix can be easily verified.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9288456 - Flags: approval-mozilla-beta?
Flags: qe-verify+

hi :calixte! is there an update on getting this landed soon in 105? We only have two betas left for the 104 cycle in order to uplift this.

Flags: needinfo?(cdenizet)

Fixed on trunk by way of bug 1783605.

Closed: 2 months ago
Flags: needinfo?(cdenizet)
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
QA Whiteboard: [qa-triaged]

Comment on attachment 9288456 [details]
Bug 1777693 - Fix printing of PDF containt some optional contents r=#pdfjs-reviewers

ty Ryan!
Approved for 104.0b8

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

Reproduced the initial issue using old Nightly build from 2022-07-01, verified that using latest Nightly 105.0a1 and Firefox 104.0b8 across platforms (Windows 10 64bit, macOS 11.6 and Ubuntu 18.04 the content of the pdf is shown in the preview and after printing. I will go ahead and close this bug as verified fixed.

One issue I saw in Firefox that the sketches are placed differently when in preview and after printed compared to the actual placement of the sketches in the .pdf, I see that Chrome does print the .pdf file as is. This behavior is the same as it was before the this regression was introduced. Is this a known issue?

QA Whiteboard: [qa-triaged]
Flags: qe-verify+ → needinfo?(cdenizet)

Yes it's a known issue, see bug 1714327.

Flags: needinfo?(cdenizet)
You need to log in before you can comment on or make changes to this bug.