Bug 497746 - Okular overrides CUPS printer settings making it impossible to print in B/W
Summary: Okular overrides CUPS printer settings making it impossible to print in B/W
Status: RESOLVED DUPLICATE of bug 449709
Alias: None
Product: okular
Classification: Applications
Component: printing (show other bugs)
Version: 24.08.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-21 12:09 UTC by Sergio
Modified: 2024-12-30 06:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio 2024-12-21 12:09:30 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY

Okular appears to *override* the CUPS printer settings, forcing the printer to print in color even if it is configured to print in black and white.

I have an HP printer and I am using the HPLIP printer driver for it. The driver has an option "Print color as Gray". I set it by default to YES. When I open a PDF document using color in Okular and I try to print it, I see no okular option to select Grayscale or Color printing (there used to be one under "options" long time ago). However, I can go to the advanced printer settings and verify there that "Print Color as Gray is ticked". However, Okular appears to override it and prints in color.

The issue appears to be with Okular, not with CUPS or the printer drivers. If I print from other applications, then I can print in grayscale. Most notably, If I open the same PDF document with another PDF viewer (e.g., the last free version of masterpdfeditor), and I print, the printout comes in grayscale (note that masterpdfeditor has a tick to force the grayscale printing, but if the "advanced printer options" are ste to "Print Color as Gray", then this application prints in grayscale even when the tick to force grayscale printing from the application is not selected).

This issue is very bad. I have left priority as normal, but please consider raising it. On many printers the cost of color printing is 4-12 times the cost of printing in black and white.

STEPS TO REPRODUCE
1. Open a PDF document including colored elements
2. Open the print dialog
3. Assure that in the advanced printer options everything is configured to print in grayscale

OBSERVED RESULT

Okular still prints in color

EXPECTED RESULT

Okular should print in grayscale when the printer is configured to print in grayscale

SOFTWARE/OS VERSIONS

Operating System: Manjaro Linux 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.1
Kernel Version: 6.6.65-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4750HQ CPU @ 2.00GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Pro Graphics P5200
Manufacturer: Notebook
Product Name: W740SU


ADDITIONAL INFORMATION
Comment 1 Sergio 2024-12-21 12:12:03 UTC
If you force the rasterization, then Okular respects the printer setup to print in grayscale.
Comment 2 Sergio 2024-12-21 12:18:33 UTC
As a matter of fact, the issue appears to be more of a weird Okular/CUPS interaction. If I print using the HPLIP driver I see this issue (that appears to be okular specific, other applications do not have it). If I print using the CUPS "driverless" printing mode, then Okular respects the Adavanced printing option to print in Monochrome (in this case the option name is not "print colors in gray", but "monochrome"), even when the rasterization is not selected.
Comment 3 John Kizer 2024-12-30 06:10:05 UTC
Hi - thanks for your bug report! I'm merging this under an existing Bugzilla ticket that covers the issue to keep history of the issue tracked together.

*** This bug has been marked as a duplicate of bug 449709 ***