[CUPS] In some printers, page is printed with colors even if "Black and white" mode is selected from print preview
Categories
(Core :: Printing: Output, defect, P1)
Tracking
()
People
(Reporter: csasca, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [print2020_v87] [old-ui?])
Attachments
(8 files, 1 obsolete file)
Affected versions
- Firefox 83.0b4
- Firefox 84.0a1
Affected platforms
- Windows 7
- macOS 10.15.7
- Ubuntu 20.04
Steps to reproduce
- Launch Firefox
- Access a page of choice and then print preview it
- Select "Black and white" setting from Color mode
- Print the page
Expected result
- The page is printed only in black and white
Actual result
- The page is still printed with colors
Regression range
- Tried with a 81.0a1 build with the old modal, but I wasn't able to find a setting to change between black and white or color
Additional notes
- The printer is a HP Officejet 6500 E710n-z
- Driver on Linux - HP Officejet 6500 e710n-z, hpcups 3.20.3 (color, 2-sided printing)
- Driver on macOS 10.15.7 - 4.2.2
Suggested severity
- S2
Reporter | ||
Updated•4 years ago
|
Comment 2•4 years ago
|
||
Does any of these two builds print gray on Mac / Linux?
- https://treeherder.mozilla.org/#/jobs?repo=try&revision=e28663066643eb948c596bf43f3202f565b718b3
- https://treeherder.mozilla.org/#/jobs?repo=try&revision=3d17454edfb9187bd0565560ecf6f218d7b9e6bf
Also, does Windows 10 properly print gray or was that not tested?
Updated•4 years ago
|
Reporter | ||
Comment 3•4 years ago
•
|
||
Tried with both builds and the pages are still printed color on macOS 10.15.7 (via wireless printing).
Took a check on Windows 10 too, and it seems that it is not affected by this issue. The page was printed black and white.
Comment 4•4 years ago
•
|
||
Just gave this a shot on my macOS (10.15.7) laptop, printing to a Canon iX6820 via direct cable.
Mozregression led me to this range, which includes Bug 1670943: Black and White printing support for macOS.
Prior to that patch, the drop-down to select color/monochrome is grayed out for macOS, so I couldn't confirm whether the monochrome print ever worked with my printer from the print UI before then.
Feel free to ping me if you need me to test a patch on macOS.
Comment 5•4 years ago
|
||
Two questions:
- Does your printer have a monochrome option at all in the system dialog?
- Does printing monochrome work on Chrome?
If the former is true I want some cups logs of a monochrome job and a color job, but we can figure that out via Matrix or what not.
Comment 6•4 years ago
•
|
||
Those are good questions.
Re: Does your printer have a monochrome option at all in the system dialog?
It actually does not. Using mozregression to check a time before the print project started, it didn't then, either.
Re: Does printing monochrome work on Chrome?
Chrome also does not allow me to choose monochrome for my printer.
Digging in a bit more, it looks like my particular printer doesn't have a setting to use only black ink. Instead, it mixes other inks when it needs to print in grayscale.
So I wonder if our issue here is that we're somehow not getting the correct SupportsMonochrome()
value from printers.
I'm also not sure what this means for the terminology Grayscale
vs. Monochrome
. It seems like perhaps Monochrome means to instruct your printer to only use black ink, where as Grayscale means to submit a print job that has no color?
I wonder if we could provide more options in the future, for printers like mine, by editing the source content to be grayscale and submitting that, even if it's technically a full-color print job.
Comment 7•4 years ago
|
||
Yeah, does it support grayscale? If so, could you attach the ppd file for the printer somewhere?
Comment 8•4 years ago
|
||
Yes, according to the manual, it supports grayscale.
I'm attaching the PPD file. I had to compress it because it was too large to be a raw attachment.
Comment 9•4 years ago
|
||
Ok, does adding an entry to this with "CNIJGrayScale", "1"
cause it to be grayscale? If it doesn't, try "ON"
instead of "1"
?
Sorry for the ping-pong, driver-specific issues really suck :-/
Comment 10•4 years ago
•
|
||
You're fine.
This worked for me with "1"
: It correctly printed in black and white. I tried in color after that, and that worked as expected, too.
I didn't try with "ON"
since "1"
worked.
Comment 11•4 years ago
|
||
Ok, wanna send that patch in a separate bug, with a /* Canon */
comment of sorts? :-)
In terms of this bug... Catalin, any chance you could get the particular ppd file you're using? I clearly didn't find the right driver when searching for the comment 0 ones.
Thanks
Comment 12•4 years ago
|
||
Yep, I'll submit a patch ASAP.
Comment 13•4 years ago
•
|
||
Catalin, if it saves you any time, the PPD files on my Mac were located in
/Library/Printers/PPDs/Contents/Resources/
with the individual files inside a bunch of .gz
archives.
Reporter | ||
Comment 14•4 years ago
|
||
Here is the folder "Resources" from the path Erik gave me. Hope this helps.
Comment 15•4 years ago
|
||
Hmm, I don't see any gzipped ppd there unfortunately :(
Maybe you can zip up the whole PPDs directory? Or maybe the .gz files are somewhere else or are skipped while compressing the rest of the directory?
Reporter | ||
Comment 16•4 years ago
•
|
||
Emilio, here's the whole printer folder from library, maybe they are somewhere else, indeed :(
Reporter | ||
Comment 17•4 years ago
|
||
This is the correct one, it seems that I compressed the application instead of opening it first.
Comment 18•4 years ago
|
||
Catalin, I also have some other PPD files in
/private/etc/cups/ppd/
Maybe that's where yours are stored?
Updated•4 years ago
|
Reporter | ||
Comment 19•4 years ago
|
||
Yup Erik, you were right, here's the actual PPD for the printer.
Comment 20•4 years ago
|
||
Thanks Catalin!
So, hmm, given this:
*OrderDependency: 10 AnySetup *ColorModel
*DefaultColorModel: RGB
*ColorModel Gray/Grayscale: "<</cupsColorSpace 18/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*ColorModel RGB/Color: "<</cupsColorSpace 19/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*CloseUI: *ColorModel
I would've expected this line to take care of it...
Catalin, curious, does monochrome printing work from Chrome with the same printer?
Updated•4 years ago
|
Reporter | ||
Comment 21•4 years ago
|
||
Hey Emilio, sorry for the late response. Tried on Ubuntu 20.04 but I cannot find the color settings in Chrome. Any idea?
Comment 22•4 years ago
|
||
It seems chrome is not detecting monochrome printing either, otherwise you should see it above the "More settings" menu.
Reporter | ||
Comment 23•4 years ago
|
||
Ok, so Windows 10 is not affected at all by the monochrome setting, and it prints black and white if selected on every browser.
While on Windows 7, while plugged with USB, Firefox will still print color if b&w is selected, Internet Explorer 11 uses system settings and I couldn't find anywhere monochrome settings (windows 10 has the setting in IE11), and Edge (87.0.664.47) will print b&w if selected.
Tried Safari 14.0.1 but no luck in finding monochrome print (closest is Color Matching which has ColorSync and Vendor Matching settings, which are not related to monochrome).
Same driver, HP Officejet 6500 E710n-z
Updated•4 years ago
|
Updated•4 years ago
|
Comment 24•4 years ago
|
||
This bug happens to me with Nightly 86.0a1 (2020-12-31) on Linux (Ubuntu 18.04) with a HP Deskjet 1055.
This printer has always supported grayscale printing, and it still works in Firefox when I use the system dialog and select "High quality grayscale". The bug is only when selecting "Black and white" from the new Firefox print screen.
Let me know if I can provide any assistance with this.
Comment 25•4 years ago
|
||
Can you attach the ppd of your printer driver Will?
Comment 26•4 years ago
|
||
Here it is
Comment 27•4 years ago
|
||
So we're passing ColorModel=Gray
here, but your printer recognizes ColorModel=CMYGray
and ColorModel=KGray
instead :/
If you go to about:config
, and change print.cups.monochrome.extra_settings
to be ColorModel:CMYGray
, does printing in monochrome start working?
Comment 28•4 years ago
|
||
Yep, that works!
I guess that ColorModel:CMYGray
is what the system dialog calls "High quality grayscale" and ColorModel=KGray
(which looks worse) is "Black only grayscale".
Comment 29•4 years ago
|
||
Yeah, that's exactly right. So for that printer we need to somehow detect which ColorModel
does the printer support, and use CMYGray
instead of Gray
, I suspect, since gtk stores the settings in a hash table (so we can't really give it more than one value for an option).
That's a bit annoying, as we wanted to avoid parsing the PPD when detecting print settings because doing so kinda sucks, and because the APIs to do that are deprecated in CUPS... :/
Updated•4 years ago
|
Comment 30•4 years ago
|
||
PPD file for Xerox WorkCentre 7830. As requested here: https://support.mozilla.org/en-US/questions/1325194#answer-1392414
Comment 31•4 years ago
|
||
(In reply to h0nd from comment #30)
PPD file for Xerox WorkCentre 7830. As requested here: https://support.mozilla.org/en-US/questions/1325194#answer-1392414
Great! If you go to about:config, and tweak the print.cups.monochrome.extra_settings
to say XROutputColor:PrintAsGrayscale
, does it start working?
Comment 32•4 years ago
|
||
Dear Emilio, the print looks all nice in greyscales now. What an incredible support you are providing here.
Thank you!
Comment 33•4 years ago
|
||
Great, I filed bug 1693395 for doing this by default in future versions of Firefox :)
Comment 34•4 years ago
|
||
I guess grayscale printing is fixed for everyone here now? Let us know if that's not the case.
Comment 35•3 years ago
|
||
I'm having the same issue with HP Deskjet 3510 series on Windows 10, Firefox build 94.0.1: I can choose the "Black and White" option but it prints in color. Tried changing print.cups.monochrome.extra_settings
to ColorMode:CMYGray
, ColorMode:24bpp_gray
, HPGrayScale:1
, and lastly to HPGrayScale:1, HPGrayScale:IDS_GRAYSCALE_HIGH_QUALITY, ColorMode:Monochrome
as a desperate attempt, to no avail.
I attached the gpd file for reference. Is there a chance that I have the wrong gpd file, or does firefox not support gpd at all (but then how would the "Black and White" option be available)? The thing is, I only have the one printer installed and there seems to be no other gpd/ppd files in System32/DriverStore which could be related.
Description
•