Open Bug 1846816 Opened 2 years ago Updated 2 years ago

Page still printed in color even though "Black and white" color mode was set, with EPSON XP-200 (on Windows and Linux, but not macOS)

Categories

(Core :: Printing: Output, defect)

Firefox 118
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jeremy.leland, Unassigned)

References

Details

Attachments

(5 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0

Steps to reproduce:

  1. Visit https://upload.wikimedia.org/wikipedia/commons/e/e0/SNice.svg (a small picture of a yellow smiley face)
  2. Open Print Dialog (Ctrl + P)
  3. Select color mode "Black and white"
  4. Print

This is on Windows 11. My printer is an Epson XP-200 Series (reported by Windows as EPSONC9F281). Originally discovered in Firefox 117 nightly, still happens in Firefox 118 nightly.

Actual results:

The image still printed in color, despite the preview showing grayscale (see screenshot).

Expected results:

The image should have printed black and white.

The Bugbug bot thinks this bug should belong to the 'Core::Printing: Output' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Printing: Output
Product: Firefox → Core

Thanks for the bug report. I don't have a color printer handy, so I can't confirm/test at the moment, but hopefully I or a teammate can test with one soon to see if we can reproduce.

Do you happen to know if this was a regression (i.e. did this used to work properly for you)?

bug 1847639 seems similar (it also involved unexpected colors when printing in black and white); adding see-also. Not sure whether it's a dupe or not, since I'm not sure where the color comes from in that bug (I'm not sure if it's part of the content vs. some rendering glitch). Here at least, it's pretty clearly part of the content.

See Also: → 1847639

(In reply to Daniel Holbert [:dholbert] from comment #2)

I don't have a color printer handy, so I can't confirm/test at the moment

Update: I got access to a color printer in a Mozilla office, and I'm unable to reproduce the issue so far.

From the Firefox print dialog, if I choose "Color mode: Color", then I get color output. And if I choose "Color mode: Black & White", I get grayscale output, as-expected, for the SVG linked here.

I tested two Firefox versions on Windows 11, printing to a Xerox AltaLink c8145 color printer:

  • Firefox Nightly 118.0a1 (2023-08-07), latest currently available
  • Firefox nightly 117.0a1 (2023-07-18), the version I had from the last time I booted up this Windows environment.

So: this isn't universally broken \o/

Jeremy: if you haven't already done so recently, could you test other applications (e.g. Chrome or Edge) and see if they're also affected? I think our color setting is just something that we pass along to the OS, and the print driver / printer handles it for us -- we don't do the grayscale-conversion ourselves -- so it's a bit surprising that this might be broken just for Firefox. I think this is the sort of thing that could conceivably be caused by a print driver issue, but of course that probably wouldn't be Firefox-specific.

Flags: needinfo?(jeremy.leland)

On my Windows 11 machine:

  • Chrome prints black and white, as expected
  • Firefox 115.0.3 prints color (bug)
  • Firefox 118.0.a1 (2023-08-07) prints color (bug)

On macOS 11.7.8 (Big Sur)

  • Firefox 116.0.2 prints black and white, as expected

I can reboot soon to try Linux. It does seem Windows and printer-specific so far, but it definitely seems to be an issue with Firefox (since Chrome prints as expected).

Flags: needinfo?(jeremy.leland)

Accidentally booted into my old Windows 10 22H2 instead:

  • Firefox 107.0 prints color (bug)

Kubuntu 23.04 (Kernel 6.2.0-26-generic):

  • Firefox 117.0a1 (2023-07-14) prints color (bug)
  • Chrome 115.0.5790.170 prints color (...different bug?)

Admittedly, this muddies up the waters some. Hard to say if Firefox in Linux is printing color for the same reason as Windows (since Chrome is doing it as well, certainly suggests issues with the Linux driver or printer).

I don't have any other printers available to test with, unfortunately, so I can't investigate this much further. If it's only affecting EPSON XP-200 and only under Windows, then that certainly would be a lower priority.

Wow, thanks for the thorough testing investigation!

At this point, I'm tempted to blame the driver, given that Chrome is hitting the same issue on Linux. (It's interesting that Firefox is affected & Chrome is unaffected on Windows, but that could conceivably still be a driver issue, with just a difference in how we interact with the driver somehow.)

Until we're able to reproduce locally, I suspect this'll be on the back-burner with that^ tentative diagnosis. If we hear of more users with the same issue (particularly with other printers), that'll probably raise the priority & likelihood-of-there-being-a-Firefox-bug here, though.

Severity: -- → S3
Summary: Page still printed in color even though "Black and white" color mode was set → Page still printed in color even though "Black and white" color mode was set, with EPSON XP-200 (on Windows and Linux, but not macOS)

Would you mind checking what your printer driver version on Windows? If we run across an Epson XP-200 printer and want to test, it'll be useful to know whether we've got the same driver version as you. (I think you can follow https://support.lenovo.com/us/en/solutions/ht074186-how-to-find-the-existing-driver-version-in-windows-1087 or something along those lines.)

Same question on Linux; -- if you know whether you're using a driver provided by a Kubuntu package, or did you install a driver from Epson, that'd be useful to record here. And if you can find & post any version info for that driver, that'd be helpful, but no worries if it's not easy to find.

For Windows 11, you can also use some of the Powershell scripts here: https://superuser.com/questions/1380807/retrieve-printer-driver-version-with-powershell-printmanagement-cmdlets

In my case, the relevant driver is:
Name: Epson ESC/P-R V4 Class Driver
Version: 10.0.17119.1
Date: 4/22/2009

I can see what version info I can find for Linux.

The only driver info I can find for Linux says "EPSON XP-200 Series, driverless, 2.0rc1".

I tried printing in grayscale from LibreOffice Writer. This program makes you go into a Properties screen (see screenshot), which has two different ways of choosing color mode. There's an option "Print Color Mode" which has Color and Monochrome. Then there's another setting below for Color: "From driver", "Color", and "Grayscale". Setting "Print Color Mode" to "Monochrome" still prints color if Color is "From Driver". In fact, "Print Color Mode" seems to be ignored -- what actually matters is the "Color" setting below, which needs to be changed to Grayscale.

I realize this is a different app, but I wonder if this is giving some insight into the printer driver -- is there a different way to send grayscale info that we should be using?

(In reply to jeremy.leland from comment #10)

Created attachment 9348295 [details]
print_options_LibreOffice_linux.png

The only driver info I can find for Linux says "EPSON XP-200 Series, driverless, 2.0rc1".

Setting "Print Color Mode" to "Monochrome" still prints color if Color is "From Driver". In fact, "Print Color Mode" seems to be ignored

I'll see if I can reproduce this the next time I'm in the office from comment 3 with a color printer. For now, I would assume that LibreOffice is tripping over the same issue (e.g. a hypothetical driver bug) as Chrome and Firefox here.

what actually matters is the "Color" setting below, which needs to be changed to Grayscale.
[...] is there a different way to send grayscale info that we should be using?

I don't know for sure, but given the two independent color toggles there, I would guess that the "working" one is literally converting the colors to grayscale internally in the app, before sending any data to the printer. That approach is a foolproof method -- obviously colors won't print if you don't send any colorful content -- but it's more complicated to do in a quality-preserving way. And as shown in the LibreOffice there, it's kinda redundant, when color printers offer this feature natively (if it can be trusted to work). :)

One more thing that would be useful to test/capture -- does this work properly from the System Print dialog, from Firefox on Windows? (That takes a slightly more direct path to communicate print options sometimes.)

Steps for that:

  1. Ctrl+P while viewing the smiley testcase here in Firefox on Windows.
  2. Click "Print using the system dialog" (at the bottom of all the options on the right -- you may have to scroll to find it)
  3. In the system print dialog, ensure your Epson printer is selected, and then click "More Settings"
  4. Look for a color option in one of the tabs that are available in the settings popup, or possibly in "Advanced".
  5. If you find that, try setting it to grayscale, and then proceed with the print.

Thanks!

I don't even see options for Color/Grayscale in "Print Using System Dialog" (see screenshot)

[delayed response, sorry -- wanted to test this myself and I'm only just-now back in the location where I've got a color printer available]

I don't even see options for Color/Grayscale in "Print Using System Dialog" (see screenshot)

Interesting -- maybe that's part of the problem here.

On my end, I do see color options in the system dialog -- see screenshot. The system dialog itself has "color mode", and the "more settings" popup has a Paper/Quality tab that also lets me choose color vs. grayscale.

So I wonder if maybe your printer's driver kinda-half-supports color printing, in a way where Firefox sees that it's supported and hence shows it as an option, but then is unable to act on your choice, for the same reason that the selector is missing for you in the system dialog.

You mentioned in comment 4 that Chrome works as-expected (on Win11). Would you mind clicking out to the system print dialog from Chrome, and see if they somehow get a system print dialog that does have color-vs-grayscale as an option?

Flags: needinfo?(jeremy.leland)
Attachment #9349089 - Attachment description: image.png → screenshot of how the system print dialog looks (as-expected) for dholbert on Win11 (with color/grayscale configurable in two spots)

I also noticed that the title-bar for your system print dialog says Printing from Win32 Application - Print. Whereas mine just says Firefox - Print. That's an interesting & unexpected difference as well.

At first I was wondering if it was due to 32 vs 64-bit versions of Firefox; but I've got both installed (for release as well as Nightly), and they all show either "Firefox - Print" or "Firefox Nightly - Print" in the system print dialog titlebar.

Do you have any idea why yours says something different? i.e. do you have a different/custom build of Firefox, or is there anything particularly special about your Nightly installation? (This might not be relevant to the color/grayscale thing, but it also might be a clue.)

Here's Firefox 116.0.2 side by side with Chrome 115.0.5790.171. Neither shows options for color mode (they have the same advanced options). Only difference I see is "Print to File" option in Firefox.

Both Firefox 116 and Firefox nightly say "Printing from Win32 Application" in the system dialog for me, not sure why.

Flags: needinfo?(jeremy.leland)

Thanks for testing that.

Shot in the dark: I wonder if the "Printing from Win32 Application" label is related to the installer that you happened to use? I used the regular .exe installer; I can imagine that maybe the .zip or .msi might produce different results, if you happened to use those? But anyway, that doesn't seem related to the presence/absence of the color option, so I won't worry about that too much for the purposes of this bug here.

It's interesting that the Chrome-launched system dialog also has no idea that color is configurable. This, combined with comment 6, is all leading me to believe that there's something unconventional about the way that this particular printer (or driver-version) exposes its color-vs-grayscale setting.

Definitely a valid bug that we show the UI but don't honor it (whereas Chrome-on-Windows shows it and does honor it, as proof that it's possible to do so). But probably lowish priority for the time being.

I can provide another data point.
OS: Linux x86_64 (Arch/GNOME)
Printer: HP 6978, driver is hpcups 3.22.2 (also tested with 3.23.5)

The Firefox print dialog always gives me color output.

If I use the system dialog, I have 3 options: Color, High Quality Greyscale, and Black and White Only Greyscale.

The High Quality option uses the color cartridges to produce various shades of grey, whereas the B&W only option only uses the black cartridge. With either option I get a black and white printout.

I personally find this bug annoying, because I often forget and wind up printing a web page in color when it's completely unnecessary. I'm cheap, so I prefer to print black and white.

Happy to provide PPDs or other files if needed.

Thanks, Rob. Could you test Chrome on Linux (with Chrome's built in print dialog) as well? Jeremy observed the same bug there (comment 6), which is a clue that it might be a bug outside of Firefox in that instance.

Flags: needinfo?(rob)

Tested

  • Google Chrome 116.0.5845.96
  • Hp Officejet Pro 6978, set to "black only grayscale" in HP's Device Manager

Result:

  • There's no option in Chrome's print dialog to set color or b&w. Rude.
  • Prints in color
  • Checked system print dialog, it is defaulting to "black only grayscale"
Flags: needinfo?(rob)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: