When a PPD for a driverless printer is generated by the
_ppdCreateFromIPP2() function and the get-printer-attributes IPP
response gives "print-color-mode-default=auto" the PPD's default
setting for "ColorModel" is always "RGB", even on monochrome printers,
which makes printing fail on most devices.
Now we ignore the "print-color-mode-default" if set to "auto" and
proceed as if no default was given, finding the default by selecting
the most desirable of the existing "ColorModel" choices.
int wrote_color = 0;
const char *default_color = NULL; /* Default */
- if ((keyword = ippGetString(defattr, 0, NULL)) != NULL)
+ if ((keyword = ippGetString(defattr, 0, NULL)) != NULL &&
+ strcmp(keyword, "auto"))
{
if (!strcmp(keyword, "bi-level"))
default_color = "FastGray";