In black&white print mode, there's an unexpected border around the page content
Categories
(Core :: Print Preview, defect, P2)
Tracking
()
People
(Reporter: dholbert, Assigned: emilio)
References
Details
(Whiteboard: [print2020_v81] [old-ui+])
Attachments
(4 files, 1 obsolete file)
(deleted),
application/pdf
|
Details | |
(deleted),
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details |
(deleted),
image/png
|
Details | |
(deleted),
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details |
STR:
- Ensure you have
print.tab_modal.enabled = true
in about:config - View a simple page, e.g.
about:blank
ordata:text/html,<title>Hi</title>ohai
- Print with Ctrl+P
- In the "Color mode" dropdown, choose "Black & White"
- Choose "Save to PDF" as your printer, and click "Save" at the bottom.
- View the resulting PDF.
ACTUAL RESULTS:
You end up with a page with a dark border around the page content.
EXPECTED RESULTS:
No such dark border.
This only happens in Black & White mode, as far as I can tell.
Reporter | ||
Comment 1•4 years ago
|
||
Reporter | ||
Comment 2•4 years ago
|
||
I'm on Ubuntu 20.04, with Nightly 81.0a1 (2020-08-24) (64-bit)
Reporter | ||
Comment 3•4 years ago
|
||
(Also, the text seems to be blurry in black & white mode -- you can see that in the header/footer-text in my attached about:blank PDF. That may be a separate issue, though.)
Comment 4•4 years ago
|
||
Ugh. The B&W filter should be applied on the preview only. It should never be applied to the document that actually prints or is saved to PDF since the filter will cause us to pre-rasterize at a very low resolution.
In the case of Save-to-PDF we should probably not allow the user to select B&W while we implement this using a filter, since then we're caught between saving at low resolution due to the filter, or unexpectedly saving in color when the user chose B&W.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
I sent two patches, but for the second to land we need to actually fix nsPrintSettings::SetPrintInColor for the different back-ends that aren't gtk.
Assignee | ||
Comment 6•4 years ago
|
||
This helps to prevent some snapping issues on the cairo back-end, and
seems harmless anyway because we don't have non-grey text for the
headers / footers of a page.
Assignee | ||
Comment 7•4 years ago
|
||
Depends on D88064
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 9•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #5)
I sent two patches, but for the second to land we need to actually fix nsPrintSettings::SetPrintInColor for the different back-ends that aren't gtk.
Would you mind filing a helper bug for that nsPrintSettings::SetPrintInColor
change?
Updated•4 years ago
|
Assignee | ||
Comment 10•4 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #9)
Would you mind filing a helper bug for that
nsPrintSettings::SetPrintInColor
change?
I kinda was planning on doing the work here tomorrow, but sure, I can do that.
Updated•4 years ago
|
Reporter | ||
Comment 11•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #10)
(In reply to Daniel Holbert [:dholbert] from comment #9)
Would you mind filing a helper bug for that
nsPrintSettings::SetPrintInColor
change?I kinda was planning on doing the work here tomorrow, but sure, I can do that.
Thanks! I just wanted to make sure it was tracked somewhere. :)
Also FWIW: I confirmed that the "fuzzy text" aspect of this bug (described in dupe bug 1660875) does manifest in actual printed output (not entirely surprisingly), in yesterday's Nightly.
Reporter | ||
Comment 12•4 years ago
|
||
Assignee | ||
Comment 13•4 years ago
|
||
See the comments as for why.
Reporter | ||
Comment 14•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #13)
Created attachment 9172199 [details]
Bug 1660857 - Disable color switch for print-to-pdf and on mac. r=emalysz
Will this help with the photo shown in comment 12? (fuzzy/low-quality text when printing to real printers, on Linux, if B&W is selected)
(I'm guessing not... Should I file a separate bug on Linux real-printer fuzziness? Or should this patch expand to also disable on linux? [if windows is fine])
Assignee | ||
Comment 15•4 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #14)
(I'm guessing not... Should I file a separate bug on Linux real-printer fuzziness? Or should this patch expand to also disable on linux? [if windows is fine])
Yes it should. By not applying the filter to the print document we shouldn't rasterize it, and we should use the native b&w support.
Reporter | ||
Comment 16•4 years ago
|
||
Oh, right - I take it we'll get that improvement (ditching the filter during actual printing) via the earlier patch, https://phabricator.services.mozilla.com/D88065 .
Updated•4 years ago
|
Comment 17•4 years ago
|
||
Comment 18•4 years ago
|
||
Backed out for bc failures on browser_parsable_css.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/36ea4d8d30c29d6a5b5fca0a744df5cb5e4eb900
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314120302&repo=autoland&lineNumber=2690
Assignee | ||
Updated•4 years ago
|
Comment 19•4 years ago
|
||
Comment 20•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5f76c97b6f20
https://hg.mozilla.org/mozilla-central/rev/734239903719
Comment 21•4 years ago
|
||
(FWIW in the macOS system print dialog when you select 'Black & White' then save to PDF, it creates a PDF with color.)
Comment 23•4 years ago
|
||
Updated•4 years ago
|
Comment 25•4 years ago
|
||
Comment on attachment 9172199 [details]
Bug 1660857 - Disable color switch for print-to-pdf and on mac. r=emalysz
Beta/Release Uplift Approval Request
- User impact if declined: The color switching behavior will be incorrect
- 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: On mac:
- Open firefox with
print.tab_modal.enabled
to true - Print a page
- Notice the color switching section is disabled
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): no strings
- String changes made/needed: n/a
Updated•4 years ago
|
Comment 26•4 years ago
|
||
Comment on attachment 9171782 [details]
Bug 1660857 - Only apply grayscale filter for printing on print preview. r=jwatt,dholbert
Approved for 81.0b6.
Updated•4 years ago
|
Comment 27•4 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/486bcf6f063b
https://hg.mozilla.org/releases/mozilla-beta/rev/38576b3d5105
Updated•4 years ago
|
Comment 28•4 years ago
|
||
Confirming this issue as verified fixed on macOS 10.15, Ubuntu 18.04 and Windows 10x64. Verified using 82.0a1 (2020-09-09) and 81.0b8
Description
•