From: Michael Sweet Date: Mon, 16 May 2016 23:54:35 +0000 (-0400) Subject: The scheduler now advertises PWG Raster attributes for IPP Everywhere clients X-Git-Tag: v2.2b1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71d227bf28c2fb6c7c0210bb02dfb991434d4674;p=thirdparty%2Fcups.git The scheduler now advertises PWG Raster attributes for IPP Everywhere clients (Issue #4428) --- diff --git a/CHANGES.txt b/CHANGES.txt index b9e5717186..3e97472f5a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,8 @@ CHANGES.txt - 2.2b1 - 2016-05-16 CHANGES IN CUPS V2.2b1 + - The scheduler now advertises PWG Raster attributes for IPP Everywhere + clients (Issue #4428) - The scheduler now logs informational messages for jobs at LogLevel "info" (Issue #4815) - The scheduler now uses the getgrouplist function when available diff --git a/scheduler/printers.c b/scheduler/printers.c index 62f846c529..7aa7bd8f24 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -3809,6 +3809,12 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ margins[16]; /* media-*-margin-supported values */ const char *filter, /* Current filter */ *mandatory; /* Current mandatory attribute */ + static const char * const pwg_raster_document_types[] = + { + "black_1", + "sgray_8", + "srgb_8" + }; static const char * const sides[3] = /* sides-supported values */ { "one-sided", @@ -4413,6 +4419,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ "print-color-mode-supported", 2, NULL, color_modes); ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "print-color-mode-default", NULL, "color"); + ippAddStrings(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "pwg-raster-document-type-supported", 3, NULL, pwg_raster_document_types); } else { @@ -4420,6 +4427,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ "print-color-mode-supported", NULL, "monochrome"); ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "print-color-mode-default", NULL, "monochrome"); + ippAddStrings(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "pwg-raster-document-type-supported", 2, NULL, pwg_raster_document_types); } /* @@ -4457,10 +4465,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ * Report all supported resolutions... */ - attr = ippAddResolutions(p->ppd_attrs, IPP_TAG_PRINTER, - "printer-resolution-supported", - resolution->num_choices, IPP_RES_PER_INCH, - NULL, NULL); + attr = ippAddResolutions(p->ppd_attrs, IPP_TAG_PRINTER, "printer-resolution-supported", resolution->num_choices, IPP_RES_PER_INCH, NULL, NULL); for (i = 0, choice = resolution->choices; i < resolution->num_choices; @@ -4483,9 +4488,10 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ attr->values[i].resolution.units = IPP_RES_PER_INCH; if (choice->marked) - ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, - "printer-resolution-default", IPP_RES_PER_INCH, - xdpi, ydpi); + ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, "printer-resolution-default", IPP_RES_PER_INCH, xdpi, ydpi); + + if (i == 0) + ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, "pwg-raster-document-resolution-supported", IPP_RES_PER_INCH, xdpi, ydpi); } } else if ((ppd_attr = ppdFindAttr(ppd, "DefaultResolution", NULL)) != NULL && @@ -4518,6 +4524,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, "printer-resolution-supported", IPP_RES_PER_INCH, xdpi, ydpi); + ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, "pwg-raster-document-resolution-supported", IPP_RES_PER_INCH, xdpi, ydpi); } else { @@ -4531,6 +4538,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, "printer-resolution-supported", IPP_RES_PER_INCH, 300, 300); + ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, "pwg-raster-document-resolution-supported", IPP_RES_PER_INCH, 300, 300); } /* @@ -4550,6 +4558,8 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ { p->type |= CUPS_PRINTER_DUPLEX; + ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "pwg-raster-document-sheet-back", NULL, "normal"); + ippAddStrings(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "sides-supported", 3, NULL, sides);