]> git.ipfire.org Git - thirdparty/cups-filters.git/commit
libppd: Make driverless printing PPDs from CUPS work correctly
authorTill Kamppeter <till.kamppeter@gmail.com>
Sat, 20 Aug 2022 15:29:37 +0000 (17:29 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Sat, 20 Aug 2022 15:29:37 +0000 (17:29 +0200)
commite414b73493cb542403ac7702a44091b2d0e5417a
tree06ee5a070755f388cd32c261f6cab3228569c2ff
parent7a3300270fddcf66835f6a6041602b1386230a45
libppd: Make driverless printing PPDs from CUPS work correctly

If one sets up a driverless printer with CUPS, either manually by the
"-m everywhere" option for "lpadmin" (or equivalent functionality in
the web interface) or automatically when CUPS creates a temporary
queue, the generated PPD file did not work correctly with current
cups-filters.

CUPS' auto-generated PPD files to not contain "*cupsUrfSupported: ..."
or "*cupsPwgRaster..." lines, but instead, add pseudo-PostScript code
(as in PPDs for CUPS Raster drivers) to the "ColorModel" and
"cupsPrintQuality" options.

Therefore the ppdLoadAttributes() function should not create artifical
"urf-supported" or "pwg-raster-..." printer IPP attributes and the
ppdFilterLoadPPD() should instead create a sample Raster header as it
already does for PPDs for CUPS Raster drivers. This way color space,
depth, and resolution get supplied to the filters via the header.

This commit does the appropriate changes.
ppd/ppd-filter.c
ppd/ppd-ipp.c