"Sheets of paper" incorrect when numCopies>1 and sheetCount is odd
Categories
(Toolkit :: Printing, defect, P1)
Tracking
()
People
(Reporter: haik, Assigned: haik)
References
Details
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-esr91+
|
Details | Review |
There's a bug in the fix for bug 1695645 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);
+ }
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Multiply the sheet count by numCopies after accounting for duplex printing.
Pushed by haftandilian@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6b1fd065c98c "Sheets of paper" incorrect when numCopies>1 and sheetCount is odd r=emilio
Comment 3•3 years ago
|
||
bugherder |
Assignee | ||
Comment 4•3 years ago
|
||
Comment on attachment 9245844 [details]
Bug 1735587 - "Sheets of paper" incorrect when numCopies>1 and sheetCount is odd r?emilio
Beta/Release Uplift Approval Request
- User impact if declined: When printing multiple copies of a document with an odd number of pages in double-sided mode (aka duplex mode) , the "<x> sheets of paper" text in the print dialog will display the wrong number of pages.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Open the print dialog for a document with an odd number of pages and set the options to print more than one copy and in double-sided mode. The sheet count should reflect double-side count with each copy not sharing any pages.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Only affects the print dialog and is a very small change.
- String changes made/needed:
Assignee | ||
Comment 5•3 years ago
|
||
Comment on attachment 9245844 [details]
Bug 1735587 - "Sheets of paper" incorrect when numCopies>1 and sheetCount is odd r?emilio
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Same rationale as bug 1695645 which introduced this problem. 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 for a document with an odd number of pages with multiple copies enabled. Likely to be more annoying in ESR where presumably more printing is done.
- User impact if declined: When printing multiple copies of a document with an odd number of pages in double-sided mode (aka duplex mode) , the "<x> sheets of paper" text in the print dialog will display the wrong number of pages.
- Fix Landed on Version: 95
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Only affects the print dialog and is a very small change.
- String or UUID changes made by this patch:
Comment 6•3 years ago
|
||
Comment on attachment 9245844 [details]
Bug 1735587 - "Sheets of paper" incorrect when numCopies>1 and sheetCount is odd r?emilio
Follow-up fix for bug 1695645, approved for 94.0b9 and 91.3esr.
Comment 7•3 years ago
|
||
bugherder uplift |
Comment 8•3 years ago
|
||
bugherder uplift |
Updated•3 years ago
|
Updated•3 years ago
|
Comment 9•3 years ago
|
||
I was able to reproduce the issue on Firefox 95.0a1 (2021-10-13) under Windows 11 by following the information provided on Comment 4.
The issue is fixed on Firefox 95.0a1 (2021-10-24), Firefox 94.0b9 and ESR 91.3.0 (build from treeherder - 20211024155628). Tests were performed on Windows 11, macOS 11.6.7 and Ubuntu 20.04.
Description
•