You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
libppd remaps print-color-mode=bi-level, no 1-bit PWG output possible #91
If the printer reports support for 1-bit bi-level raster (print-color-mode=bi-level, pwg-raster-document-type=black_1), libppd will remap -o print-color-mode=bi-level to =monochrome, because the ippeve generator uses ColorModel=FastGray for 1-bit output, but libppd remaps FastGray to print-color-mode=monochrome instead of =bi-level.
I'd like to fix this one. In ppdConvertOptions() (ppd-cache.c), FastGray always becomes "monochrome", so bi-level is never requested. I'll map it to bi-level when the printer supports it and add a test.
Keep in mind that the IPP printer might have black_1 in pwg-raster-document-type-supported only, but announce print-color-mode-supported=monochrome, without bi-level. That's also acceptable according to specification as far as I could see.
This means that CUPS, somehow, needs to generate 1-bit output even with print-color-mode=monochrome, if the printer has only pwg-raster-document-type=black_1.
Keep in mind that the IPP printer might have black_1 in pwg-raster-document-type-supported only, but announce print-color-mode-supported=monochrome, without bi-level. That's also acceptable according to specification as far as I could see.
This means that CUPS, somehow, needs to generate 1-bit output even with print-color-mode=monochrome, if the printer has only pwg-raster-document-type=black_1.
Thanks @ValdikSS , that makes sense. I opened #106 for the bi-level case here. A printer with only black_1 that lists monochrome still gets monochrome; I left that for libcupsfilters #298 . I can look at that one next if nobody else is on it.
If I have a printer that reports print-color-mode-supported=bi-level, it still gets monochrome (PPD from driverless). This happens regardless of whether lp is run without arguments or with -o ColorModel=FastGray -o print-color-mode=bi-level.
If I pass only -o print-color-mode=bi-level to lp, something really strange happens:
Where bi-level+monochrome/sgray_1+black_8 means that the printer reports print-color-mode-supported=bi-level,monochrome (default: bi-level) and pwg-raster-document-type-supported=sgray_1,black_8 (default: sgray_1).
If I have a printer that reports print-color-mode-supported=bi-level, it still gets monochrome (PPD from driverless). This happens regardless of whether lp is run without arguments or with -o ColorModel=FastGray -o print-color-mode=bi-level.
If I pass only -o print-color-mode=bi-level to lp, something really strange happens:
Where bi-level+monochrome/sgray_1+black_8 means that the printer reports print-color-mode-supported=bi-level,monochrome (default: bi-level) and pwg-raster-document-type-supported=sgray_1,black_8 (default: sgray_1).
#106 fixed the mapping in libppd's ppdConvertOptions(), which is what the issue pointed to. What you see with lp comes from CUPS's own copy, _cupsConvertOptions() in cups/ppd-cache.c (used by backend/ipp.c), which still maps FastGray to monochrome. So the libppd fix is correct, but the same change is needed in OpenPrinting/cups for normal printing.
Activity
DSingh0304 commentedon Nov 13, 2026
I'd like to fix this one. In
ppdConvertOptions() (ppd-cache.c), FastGray always becomes "monochrome", so bi-level is never requested. I'll map it to bi-level when the printer supports it and add a test.ValdikSS commentedon Nov 13, 2026
Keep in mind that the IPP printer might have
black_1inpwg-raster-document-type-supportedonly, but announceprint-color-mode-supported=monochrome, withoutbi-level. That's also acceptable according to specification as far as I could see.This means that CUPS, somehow, needs to generate 1-bit output even with
print-color-mode=monochrome, if the printer has onlypwg-raster-document-type=black_1.But maybe that could be seen as another bug, and probably not in libppd.
Also see OpenPrinting/libcupsfilters#298
DSingh0304 commentedon Nov 13, 2026
Thanks @ValdikSS , that makes sense. I opened #106 for the
bi-levelcase here. A printer with onlyblack_1that lists monochrome still getsmonochrome; I left that for libcupsfilters #298 . I can look at that one next if nobody else is on it.ppd-cache.c: Map FastGray to bi-level when the printer supports it
darkvision77 commentedon Nov 15, 2026
I'm not sure about closing this one too.
If I have a printer that reports
print-color-mode-supported=bi-level, it still getsmonochrome(PPD from driverless). This happens regardless of whetherlpis run without arguments or with-o ColorModel=FastGray -o print-color-mode=bi-level.If I pass only
-o print-color-mode=bi-leveltolp, something really strange happens:Where
bi-level+monochrome/sgray_1+black_8means that the printer reportsprint-color-mode-supported=bi-level,monochrome(default:bi-level) andpwg-raster-document-type-supported=sgray_1,black_8(default:sgray_1).DSingh0304 commentedon Nov 15, 2026
#106 fixed the mapping in libppd's
ppdConvertOptions(), which is what the issue pointed to. What you see with lp comes from CUPS's owncopy, _cupsConvertOptions()incups/ppd-cache.c(used bybackend/ipp.c), which still maps FastGray to monochrome. So the libppd fix is correct, but the same change is needed in OpenPrinting/cups for normal printing.