Closed Bug 1695645 Opened 9 months ago Closed 2 months ago

"Sheets of paper" does not update when selecting "Print on both sides"

Categories

(Toolkit :: Printing, defect, P3)

defect

Tracking

()

VERIFIED FIXED
94 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- fixed
firefox86 --- wontfix
firefox87 --- wontfix
firefox88 --- wontfix
firefox89 --- wontfix
firefox92 --- wontfix
firefox93 --- wontfix
firefox94 --- verified
firefox95 --- verified

People

(Reporter: jwatt, Assigned: haik)

References

Details

(Keywords: regression, Whiteboard: [print2020][old-ui-])

Attachments

(1 file)

The number displayed for "Sheets of paper" in the new print UI should update when selecting "Print on both sides". That seems to have broken at some point though.

QA Whiteboard: [qa-regression-triage]
Flags: needinfo?(jwatt)
Flags: needinfo?(jwatt)
Whiteboard: [print2020_v88][old-ui-] → [print2020][old-ui-]

Consider duplex when calculating the number of sheets of paper for the print dialog.

Assignee: nobody → haftandilian
Status: NEW → ASSIGNED

I couldn't find a regression window wherein duplex printing was an option in the new dialog and use of duplex adjusted the sheet count.

Pushed by haftandilian@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a51495c7c886
"Sheets of paper" does not update when selecting "Print on both sides" r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

The patch landed in nightly and beta is affected.
:haik, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(haftandilian)
Flags: needinfo?(haftandilian)

This feels like a bug we probably don't want enterprise users to be hitting on ESR91 for the next year. Please nominate for uplift.

Flags: needinfo?(haftandilian)

Comment on attachment 9240791 [details]
Bug 1695645 - "Sheets of paper" does not update when selecting "Print on both sides" r?emilio

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: It's a "paper cut" type issue (no pun intended) for printing causing the "<number> of sheets of paper" label to be incorrect when double-sided printing is used. Likely to be more annoying in ESR where presumably more printing is done.
  • User impact if declined: When in the print dialog, the text that displays how many sheets of paper is used will not account for double-sided printing. For example, if the user is printing a 10-page document in double-sided mode, the dialog incorrectly states 10 sheets of paper will be used when really only 5 sheets will be.
  • Fix Landed on Version: 94
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The fix is small and doesn't affect functionality apart from the text label listing the number of sheets of paper used. Most of the patch is test code.
  • String or UUID changes made by this patch:
Flags: needinfo?(haftandilian)
Attachment #9240791 - Flags: approval-mozilla-esr91?

Comment on attachment 9240791 [details]
Bug 1695645 - "Sheets of paper" does not update when selecting "Print on both sides" r?emilio

Approved for 91.3esr.

Attachment #9240791 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+

Looking at these patches again, I realize there's a bug here that occurs when numCopies > 1 and the number of pages is odd.

For a 3 page document, printing double sided will require 2 sheets of paper. If numCopies==2, then a total of 4 sheets is needed. However the calculation incorrectly ends up with 3. The numCopies multiplier should be done after the duplex check. I'll file a new bug. It will be a simple fix.

Existing code:

+    let sheetCount = this.sheetCount * this.numCopies;
+
+    // When printing to a printer (not to a file) update
+    // the sheet count to account for duplex printing.
+    if (!this.printToFile && this.duplex != Ci.nsIPrintSettings.kDuplexNone) {
+      sheetCount = Math.ceil(sheetCount / 2);
+    }
Depends on: 1735587

The same checks were made in Bug 1735507. We can safely close this issue as verified.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.