apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.91k stars 462 forks source link

Printing in colour, lpadmin vs. ipp2ppd #5944

Open chalmerssys opened 3 years ago

chalmerssys commented 3 years ago

A while ago I sent in bug report https://github.com/OpenPrinting/cups/issues/182 regarding print options and printing to kerberos authenticated queues with Mac OS.

Now I have upgraded my Mac to Monterey which seems to contain the fix. Happily it works much better now! But there seems to be at least one problem. When adding the queue with the Mac GUI, everything seems to work. I notice that the ppd in this case is created by ipp2ppd. If I add the queue with lpadmin options seems to work, with the notable exception of switching between color & b/w. One is stuck with b/w (server default) for these queues. The printer is a Kyocera TaskAlfa 5052ci.

Is this something that could be fixed? Please let me know if I could help by sending in log files etc.

Additional observations: I tried printing to a HP Color LaserJet MFP E87650 instead. Same result. When creating the queue with lpadmin, the print dialog is missing the "Black & White" tick box between "Copies" and the "Two-Sided" tick box.

michaelrsweet commented 3 years ago

@chalmerssys Can you attach the PPD files for the queues that don't work? The GUI and command-line use two slightly different PPD generators (the GUI one only supports AirPrint while the command-line interface also supports IPP Everywhere) so we sometimes see slight differences like this.

chalmerssys commented 3 years ago

bad.ppd.txt Here's one...

chalmerssys commented 3 years ago

working_gui_ppd.txt Here's one that works for the same printer, created with GUI.

michaelrsweet commented 2 years ago

OK, I'm really not sure what the problem is here. ipp2ppd is reporting that this printer doesn't correctly report the "urf-supported" attribute, which means the Mac has no clue how to send it raster data if PDF doesn't work...

The issue might be the "fast gray" color option that the lpadmin PPD adds, but that would be a bug in the Apple GUI. Try deleting that line from the "bad" PPD and let me know whether that works.

chalmerssys commented 2 years ago

I deleted the fast gray color option, that did not help. I did some more experimentation, adding stuff to the lpadmin ppd that seemed to be color related from the ipp2ppd ppd. No result, until I started playing with the "Presets" menu in the GUI. I found that if I added the APPrinterPreset stuff from the bottom of the gui-generated ppd to the lpadmin ppd , I would get choices of Color and Black & White in the Presets menu that actually works. It seems with these additions (also the APAirPrint line) it works as expected, I also get a "Black & White" tick box in the GUI:

diff test_lpadmin_339.ppd.ORIG test_lpadmin_339.ppd
6a7 APAirPrint: True 285a287,304 APPrinterPreset Gray_with_Paper_Auto-Detect/Black and White: " cupsPrintQuality Normal ColorModel Gray Duplex DuplexNoTumble com.apple.print.preset.graphicsType General com.apple.print.preset.quality mid com.apple.print.preset.media-front-coating autodetect com.apple.print.preset.output-mode monochrome" End APPrinterPreset Color_with_Paper_Auto-Detect/Color: " cupsPrintQuality Normal ColorModel RGB Duplex DuplexNoTumble com.apple.print.preset.graphicsType General com.apple.print.preset.quality mid com.apple.print.preset.media-front-coating autodetect" *End

michaelrsweet commented 2 years ago

OK, tracking this for a subsequent Apple CUPS update as well as over in OpenPrinting CUPS.