Pages-per-sheet count is double-applied (squared), if you print via system print dialog
Categories
(Core :: Printing: Setup, defect)
Tracking
()
People
(Reporter: dholbert, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 external file)
STR:
- Load attached testcase (a 2-page document) in Firefox Nightly on Linux, using a fresh profile
- Ctrl+P
- Choose "Print using the System Print Dialog"
- Click the "Page Setup" tab and choose "Pages-per-side: 2" and then proceed with your print operation. (Note: this probably requires a real printer -- Pages-per-side isn't available in the system print dialog if you're using the "Print to file" print target)
- Click "Print" and look at the results.
EXPECTED RESULTS:
The printout should have a 2-pages-per-sheet layout (with my 2 portrait pages side by side, filling a landscape-orientation sheet).
ACTUAL RESULTS:
The printout has a 4-pages-per-sheet layout (with my 2 portrait-oriented pages side-by-side at the top of a portrait-oriented sheet, with the bottom half blank [or filled in with more pages if you perform these STR with a longer document].)
mozregression range:
Last good revision: 7ff758e0d08b4bdf0ce3bd2abe84a1bff3be8ff4 (2022-12-14)
First bad revision: 440856ffde519ea98b6c1fca7d461c20cc55a90c (2022-12-15)
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7ff758e0d08b4bdf0ce3bd2abe84a1bff3be8ff4&tochange=440856ffde519ea98b6c1fca7d461c20cc55a90c
In that range, I think this would have been from bug 1805716 -- that's the only print-related change in there.
There's also an interesting connection here to bug 1755974 whose patch coincidentally landed on the previous day (just before the regression range) -- at first I suspected that as the regressor, but now I don't since its patch was included in the "last-good" build here. I'll post more notes about that one in another comment so that this initial one isn't too long.
| Reporter | ||
Comment 1•2 years ago
|
||
| Reporter | ||
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Set release status flags based on info from the regressing bug 1805716
:jwatt, since you are the author of the regressor, bug 1805716, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Updated•2 years ago
|
| Reporter | ||
Comment 3•2 years ago
•
|
||
(In reply to Daniel Holbert [:dholbert] from comment #0)
There's also an interesting connection here to bug 1755974 whose patch coincidentally landed on the previous day (just before the regression range) -- at first I suspected that as the regressor, but now I don't since its patch was included in the "last-good" build here. I'll post more notes about that one in another comment so that this initial one isn't too long.
Following up on this: I think the patch that we landed in bug 1755974 didn't actually fix it, and then the patch we landed in bug 1805716 made it reproduce more readily.
To illustrate this, I tested 3 consecutive Nightlies:
- 2022-12-13 (baseline)
- 2022-12-14 (includes the patch that landed for bug 1755974)
- 2022-12-15 (includes the patch that landed for bug 1805716)
...and I tested each of those in 3 situations, printing the attached testcase (I'm listing an abbreviation for each, for the benefit of the results-table below):
- A.PPS-in-Firefox: set "pages-per-sheet:2" in Firefox's own print dialog, and then click out to System Print Dialog and proceed with the print.
- B.PPS-in-System: leave "pages-per-sheet" at the default 1 in Firefox's own print dialog, and then click out to System Print Dialog and choose "Pages-per-side: 2" (in Page Setup tab) and then print.
- C.PPS-in-Both: set
pages-per-sheetto2in Firefox's own print dialog, then click out to system print dialog and set it to2there as well, and thenPrint.
Here are the results (the pages-per-sheet count we actually render with):
A.PPS-in-Firefox B.PPS-in-System C.PPS-in-Both
Nightly 2022-12-13 2 2 4
Nightly 2022-12-14 2 2 4
Nightly 2022-12-15 4 4 4
So: Nightly 2022-12-13 and 2022-12-14 give the same results, which lead me to believe bug 1755974's patch didn't actually help, unfortunately. (I would have expected it to drop the page-count to 2 in situation C.)
And Nightly 2022-12-15 gives 4 pages across the board, but that's because A/B/C are all essentially the same situation there, because starting with that Nightly, we copy the settings from Firefox's print dialog to the system-print dialog. (So setting pages-per-sheet:2 in Firefox's print dialog means we automatically show pages-per-sheet:2 in the system print dialog as well.)
| Reporter | ||
Comment 4•2 years ago
•
|
||
FWIW this bug came across my radar because someone requested the ability to do 2-pages-per-sheet with reversed page-ordering:
https://connect.mozilla.org/t5/ideas/add-pdf-page-order-setting-when-printing/idi-p/70668
That reversed-order feature is arguably in the category of rarely-used-power-features that we can let users find in the system print dialog if they really need it, in the interests of keeping Firefox's own print dialog easy-to-use and uncluttered. (Pages-per-sheet itself is rarely-used; and reverse-order-pages-per-sheet is presumably even more of a niche thing.) And on Linux at least, there is a reversed-page-ordering feature available in the system print dialog (nice!), and it works as-expected in Nightly 2022-12-13 and 2022-12-14 (hooray!), but it's not really usable in Nightlies after that point, due to this bug here -- since just using the system print dialog at all causes the pages-per-sheet count to be applied twice, i.e. squared.
| Reporter | ||
Comment 5•2 years ago
|
||
Triaging as S3 given that this doesn't affect our built-in print dialog, and it's probably linux-specific, and we've been shipping for years without anyone noticing. :)
Still feels pretty broken & like something we should fix soonish, though.
| Reporter | ||
Comment 6•2 years ago
|
||
[clarifying bug title -- in current Nightly (and really any Nightly after 2022-12-15), this bug reproduces regardless of whether you choose 2-pages-per-sheet in the Firefox print dialog vs. the system print dialog. All that matters is that you chose 2 pages per sheet somewhere, and that you actually choose a real or real-enough CUPS printer (not the "Print to File" special print target in the system print dialog).]
| Reporter | ||
Comment 7•2 years ago
|
||
Clearing ni=jwatt since I don't think the regression status means he needs to change course & jump on this [as bugbot semi-assumes by default].
Ideally someone with print-internals knowledge (which could be either of two or another teammate) should take a look here before too long though.
| Reporter | ||
Comment 8•2 years ago
|
||
I tested to be sure this doesn't repro on macOS or Windows, and this particular issue doesn't repro, but it turns out we hit different bugs (about page-orientation) if I perform the STR there. I filed those as:
on mac: bug 1919917
on windows: bug 1919925
Updated•2 years ago
|
| Assignee | ||
Comment 10•1 year ago
|
||
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Comment 12•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Comment 13•1 year ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox134towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 14•1 year ago
|
||
I can verify that using the steps in comment 0, the printer will print 2 portrait pages on a landscape-oriented sheet of papper, as expected. This has been verified in Ubuntu 22 in the Nightly v135.0a1 and Beta v135.0b4. Closing as verified. Thank you.
Comment 15•1 year ago
|
||
This seems worth fixing for ESR users and grafts cleanly. Please nominate for uplift unless you feel strongly otherwise :-)
| Assignee | ||
Comment 16•1 year ago
|
||
Comment on attachment 9444554 [details]
Bug 1919414 - Don't use Gecko's pages per sheet code in the native print dialog. r=dholbert,jwatt
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: see above
- User impact if declined: comment 0
- Fix Landed on Version: 135
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Simple fix
Comment 17•1 year ago
|
||
Comment on attachment 9444554 [details]
Bug 1919414 - Don't use Gecko's pages per sheet code in the native print dialog. r=dholbert,jwatt
Approved for 128.7esr.
Comment 18•1 year ago
|
||
| uplift | ||
Updated•1 year ago
|
Comment 19•1 year ago
|
||
This fix has also been verified in Firefox ESR v128.7.0esr on Ubuntu 22.
Description
•