]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fixed some issues with IPP Everywhere printer support (Issue #4893)
authorMichael Sweet <michael.r.sweet@gmail.com>
Fri, 21 Oct 2016 05:15:15 +0000 (01:15 -0400)
committerMichael Sweet <michael.r.sweet@gmail.com>
Fri, 21 Oct 2016 05:15:15 +0000 (01:15 -0400)
CHANGES.txt
cups/ipp-support.c
cups/ipp.h
cups/ppd-cache.c
doc/help/man-client.conf.html
doc/help/man-cups-files.conf.html
doc/help/man-cups-lpd.html
doc/help/man-cupsd.conf.html

index 17bd893f1bc74279254fd4a2e5ada6edcd206967..c836d57a2caf81dc8115f77f8d69128343bfa27b 100644 (file)
@@ -1,8 +1,9 @@
-CHANGES.txt - 2.2.2 - 2016-10-20
+CHANGES.txt - 2.2.2 - 2016-10-21
 --------------------------------
 
 CHANGES IN CUPS V2.2.2
 
+       - Fixed some issues with IPP Everywhere printer support (Issue #4893)
        - The cups-lpd program did not catch all legacy usage of ISO-8859-1
           (Issue #4899)
         - Fixed builds on systems without a working poll() implementation
index fc53573cc586898021c45cba1a4343740ce8ca10..335ae8c1749418286e5bb14073c3c99b5da16374 100644 (file)
@@ -429,10 +429,10 @@ static const char * const ipp_document_states[] =
                  "punch-quad-top",     /* Finishings 2.0 */
                  "punch-quad-right",   /* Finishings 2.0 */
                  "punch-quad-bottom",  /* Finishings 2.0 */
-                 "86",
-                 "87",
-                 "88",
-                 "89",
+                 "punch-multiple-left",/* Finishings 2.1/Canon */
+                 "punch-multiple-top", /* Finishings 2.1/Canon */
+                 "punch-multiple-right",/* Finishings 2.1/Canon */
+                 "punch-multiple-bottom",/* Finishings 2.1/Canon */
                  "fold-accordian",     /* Finishings 2.0 */
                  "fold-double-gate",   /* Finishings 2.0 */
                  "fold-gate",          /* Finishings 2.0 */
@@ -443,7 +443,8 @@ static const char * const ipp_document_states[] =
                  "fold-parallel",      /* Finishings 2.0 */
                  "fold-poster",        /* Finishings 2.0 */
                  "fold-right-gate",    /* Finishings 2.0 */
-                 "fold-z"              /* Finishings 2.0 */
+                 "fold-z",             /* Finishings 2.0 */
+                  "fold-engineering-z" /* Finishings 2.1 */
                },
                * const ipp_finishings_vendor[] =
                {
index 84585a27c5c359c1bdd73eb42431c5e82b4afc3e..be50686fd4ce9c5774c1a99af12c337c83d44ce5 100644 (file)
@@ -150,6 +150,10 @@ typedef enum ipp_finishings_e              /**** Finishings ****/
   IPP_FINISHINGS_PUNCH_QUAD_TOP,       /* Punch 4 holes top edge */
   IPP_FINISHINGS_PUNCH_QUAD_RIGHT,     /* Punch 4 holes right side */
   IPP_FINISHINGS_PUNCH_QUAD_BOTTOM,    /* Punch 4 holes bottom edge */
+  IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT,  /* Pucnh multiple holes left side */
+  IPP_FINISHINGS_PUNCH_MULTIPLE_TOP,   /* Pucnh multiple holes top edge */
+  IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT, /* Pucnh multiple holes right side */
+  IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM,        /* Pucnh multiple holes bottom edge */
   IPP_FINISHINGS_FOLD_ACCORDIAN = 90,  /* Accordian-fold the paper vertically into four sections */
   IPP_FINISHINGS_FOLD_DOUBLE_GATE,     /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically */
   IPP_FINISHINGS_FOLD_GATE,            /* Fold the top and bottom quarters of the paper towards the midline */
@@ -161,6 +165,7 @@ typedef enum ipp_finishings_e               /**** Finishings ****/
   IPP_FINISHINGS_FOLD_POSTER,          /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold */
   IPP_FINISHINGS_FOLD_RIGHT_GATE,      /* Fold the bottom quarter of the paper towards the midline */
   IPP_FINISHINGS_FOLD_Z,               /* Fold the paper vertically into three sections, forming a Z */
+  IPP_FINISHINGS_FOLD_ENGINEERING_Z,   /* Fold the paper vertically into two small sections and one larger, forming an elongated Z */
 
   /* CUPS extensions for finishings (pre-standard versions of values above) */
   IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT = 0x40000046,
index 9ce5cfc32dada9d8d57fa6d9e72765baafb30908..11253d85734b88dd3772f7d32d94cda657f14ff7 100644 (file)
@@ -2970,6 +2970,7 @@ _ppdCreateFromIPP(char   *buffer, /* I - Filename buffer */
     { "fold", _("Fold") },
     { "fold-accordian", _("Accordian Fold") },
     { "fold-double-gate", _("Double Gate Fold") },
+    { "fold-engineering-z", _("Engineering Z Fold") },
     { "fold-gate", _("Gate Fold") },
     { "fold-half", _("Half Fold") },
     { "fold-half-z", _("Half Z Fold") },
@@ -2998,6 +2999,10 @@ _ppdCreateFromIPP(char   *buffer,        /* I - Filename buffer */
     { "punch-triple-left", _("3-Hole Punch (Portrait)") },
     { "punch-triple-right", _("3-Hole Punch (Reverse Portrait)") },
     { "punch-triple-top", _("3-Hole Punch (Landscape)") },
+    { "punch-multiple-bottom", _("Multi-Hole Punch (Reverse Landscape)") },
+    { "punch-multiple-left", _("Multi-Hole Punch (Portrait)") },
+    { "punch-multiple-right", _("Multi-Hole Punch (Reverse Portrait)") },
+    { "punch-multiple-top", _("Multi-Hole Punch (Landscape)") },
     { "saddle-stitch", _("Saddle Stitch") },
     { "staple", _("Staple") },
     { "staple-bottom-left", _("Single Staple (Reverse Landscape)") },
@@ -3146,11 +3151,8 @@ _ppdCreateFromIPP(char   *buffer,        /* I - Filename buffer */
       x_dim      = ippFindAttribute(media_size, "x-dimension", IPP_TAG_INTEGER);
       y_dim      = ippFindAttribute(media_size, "y-dimension", IPP_TAG_INTEGER);
 
-      if (x_dim && y_dim)
-      {
-        pwg = pwgMediaForSize(ippGetInteger(x_dim, 0), ippGetInteger(y_dim, 0));
+      if (x_dim && y_dim && (pwg = pwgMediaForSize(ippGetInteger(x_dim, 0), ippGetInteger(y_dim, 0))) != NULL)
        strlcpy(ppdname, pwg->ppd, sizeof(ppdname));
-      }
       else
        strlcpy(ppdname, "Unknown", sizeof(ppdname));
     }
@@ -3169,13 +3171,11 @@ _ppdCreateFromIPP(char   *buffer,       /* I - Filename buffer */
       x_dim      = ippFindAttribute(media_size, "x-dimension", IPP_TAG_INTEGER);
       y_dim      = ippFindAttribute(media_size, "y-dimension", IPP_TAG_INTEGER);
 
-      if (x_dim && y_dim)
+      if (x_dim && y_dim && (pwg = pwgMediaForSize(ippGetInteger(x_dim, 0), ippGetInteger(y_dim, 0))) != NULL)
       {
         char   twidth[256],            /* Width string */
                tlength[256];           /* Length string */
 
-        pwg = pwgMediaForSize(ippGetInteger(x_dim, 0), ippGetInteger(y_dim, 0));
-
         _cupsStrFormatd(twidth, twidth + sizeof(twidth), pwg->width * 72.0 / 2540.0, loc);
         _cupsStrFormatd(tlength, tlength + sizeof(tlength), pwg->length * 72.0 / 2540.0, loc);
 
@@ -3193,13 +3193,11 @@ _ppdCreateFromIPP(char   *buffer,       /* I - Filename buffer */
       x_dim      = ippFindAttribute(media_size, "x-dimension", IPP_TAG_INTEGER);
       y_dim      = ippFindAttribute(media_size, "y-dimension", IPP_TAG_INTEGER);
 
-      if (x_dim && y_dim)
+      if (x_dim && y_dim && (pwg = pwgMediaForSize(ippGetInteger(x_dim, 0), ippGetInteger(y_dim, 0))) != NULL)
       {
         char   twidth[256],            /* Width string */
                tlength[256];           /* Length string */
 
-        pwg = pwgMediaForSize(ippGetInteger(x_dim, 0), ippGetInteger(y_dim, 0));
-
         _cupsStrFormatd(twidth, twidth + sizeof(twidth), pwg->width * 72.0 / 2540.0, loc);
         _cupsStrFormatd(tlength, tlength + sizeof(tlength), pwg->length * 72.0 / 2540.0, loc);
 
@@ -3216,7 +3214,7 @@ _ppdCreateFromIPP(char   *buffer, /* I - Filename buffer */
       x_dim      = ippFindAttribute(media_size, "x-dimension", IPP_TAG_INTEGER);
       y_dim      = ippFindAttribute(media_size, "y-dimension", IPP_TAG_INTEGER);
 
-      if (x_dim && y_dim)
+      if (x_dim && y_dim && (pwg = pwgMediaForSize(ippGetInteger(x_dim, 0), ippGetInteger(y_dim, 0))) != NULL)
       {
         char   tleft[256],             /* Left string */
                tbottom[256],           /* Bottom string */
@@ -3225,8 +3223,6 @@ _ppdCreateFromIPP(char   *buffer, /* I - Filename buffer */
                twidth[256],            /* Width string */
                tlength[256];           /* Length string */
 
-        pwg = pwgMediaForSize(ippGetInteger(x_dim, 0), ippGetInteger(y_dim, 0));
-
         _cupsStrFormatd(tleft, tleft + sizeof(tleft), left * 72.0 / 2540.0, loc);
         _cupsStrFormatd(tbottom, tbottom + sizeof(tbottom), bottom * 72.0 / 2540.0, loc);
         _cupsStrFormatd(tright, tright + sizeof(tright), (pwg->width - right) * 72.0 / 2540.0, loc);
@@ -3479,7 +3475,8 @@ _ppdCreateFromIPP(char   *buffer, /* I - Filename buffer */
   */
 
   if ((attr = ippFindAttribute(response, "pwg-raster-document-type-supported", IPP_TAG_KEYWORD)) == NULL)
-    attr = ippFindAttribute(response, "print-color-mode-supported", IPP_TAG_KEYWORD);
+    if ((attr = ippFindAttribute(response, "urf-supported", IPP_TAG_KEYWORD)) == NULL)
+      attr = ippFindAttribute(response, "print-color-mode-supported", IPP_TAG_KEYWORD);
 
   if (attr)
   {
@@ -3501,7 +3498,7 @@ _ppdCreateFromIPP(char   *buffer, /* I - Filename buffer */
         if (!default_color)
          default_color = "FastGray";
       }
-      else if (!strcmp(keyword, "sgray_8") || !strcmp(keyword, "monochrome") || !strcmp(keyword, "process-monochrome"))
+      else if (!strcmp(keyword, "sgray_8") || !strcmp(keyword, "W8") || !strcmp(keyword, "monochrome") || !strcmp(keyword, "process-monochrome"))
       {
         if (!default_color)
          cupsFilePrintf(fp, "*OpenUI *ColorModel/%s: PickOne\n"
@@ -3512,7 +3509,7 @@ _ppdCreateFromIPP(char   *buffer, /* I - Filename buffer */
         if (!default_color || !strcmp(default_color, "FastGray"))
          default_color = "Gray";
       }
-      else if (!strcmp(keyword, "srgb_8") || !strcmp(keyword, "color"))
+      else if (!strcmp(keyword, "srgb_8") || !strcmp(keyword, "SRGB24") || !strcmp(keyword, "color"))
       {
         if (!default_color)
          cupsFilePrintf(fp, "*OpenUI *ColorModel/%s: PickOne\n"
@@ -3522,6 +3519,16 @@ _ppdCreateFromIPP(char   *buffer,        /* I - Filename buffer */
 
        default_color = "RGB";
       }
+      else if (!strcmp(keyword, "adobe-rgb_16") || !strcmp(keyword, "ADOBERGB48"))
+      {
+        if (!default_color)
+         cupsFilePrintf(fp, "*OpenUI *ColorModel/%s: PickOne\n"
+                            "*OrderDependency: 10 AnySetup *ColorModel\n", _cupsLangString(lang, _("Color Mode")));
+
+        cupsFilePrintf(fp, "*ColorModel AdobeRGB/%s: \"<</cupsColorSpace 20/cupsBitsPerColor 16/cupsColorOrder 0/cupsCompression 0>>setpagedevice\"\n", _cupsLangString(lang, _("Deep Color")));
+
+       default_color = "AdobeRGB";
+      }
     }
 
     if (default_color)
@@ -3984,7 +3991,7 @@ pwg_ppdize_name(const char *ipp,  /* I - IPP keyword */
 
   for (ptr = name + 1, end = name + namesize - 1; *ipp && ptr < end;)
   {
-    if (*ipp == '-' && _cups_isalpha(ipp[1]))
+    if (*ipp == '-' && _cups_isalnum(ipp[1]))
     {
       ipp ++;
       *ptr++ = (char)toupper(*ipp++ & 255);
index 6febe5e32736506daccade08ef2784cedfd7c11d..16c1919e34f78119bc2d0e9d42ec6155871cdaee 100644 (file)
@@ -37,7 +37,7 @@ CUPS adds the remote hostname ("name@server.example.com") for you. The default n
 <dt><b>ServerName </b><i>hostname-or-ip-address</i>[<i>:port</i>]
 <dd style="margin-left: 5.0em"><dt><b>ServerName </b><i>/domain/socket</i>
 <dd style="margin-left: 5.0em">Specifies the address and optionally the port to use when connecting to the server.
-<b>Note: This directive is not supported on macOS 10.7 or later.</b>
+<b>Note: This directive it not supported on macOS 10.7 or later.</b>
 <dt><b>ServerName </b><i>hostname-or-ip-address</i>[<i>:port</i>]<b>/version=1.1</b>
 <dd style="margin-left: 5.0em">Specifies the address and optionally the port to use when connecting to a server running CUPS 1.3.12 and earlier.
 <dt><b>SSLOptions </b>[<i>AllowDH</i>] [<i>AllowRC4</i>] [<i>AllowSSL3</i>] [<i>DenyTLS1.0</i>]
index 7dfcd211db6be775a0ee0b20594483a69229b70a..093ba6f4f494e03ae42fde7dc72412f922e7a671 100644 (file)
@@ -44,10 +44,6 @@ The default is "0644" on macOS and "0640" on all other operating systems.
 This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system.
 There is no way to disable this security feature.
 <dl class="man">
-<dt><a name="CreateSelfSignedCerts"></a><b>CreateSelfSignedCerts yes</b>
-<dd style="margin-left: 5.0em"><dt><b>CreateSelfSignedCerts no</b>
-<dd style="margin-left: 5.0em">Specifies whether the scheduler automatically creates self-signed certificates for client connections using TLS.
-The default is yes.
 <dt><a name="DataDir"></a><b>DataDir </b><i>path</i>
 <dd style="margin-left: 5.0em">Specifies the directory where data files can be found.
 The default is usually "/usr/share/cups".
index 7a6b6396dca1621d9024f3df40af9c2deae927bf..e81a01e63d05c4d895dffb7a20f85c35dd1ebe17 100644 (file)
@@ -94,7 +94,7 @@ program to register the changes to the <i>inetd.conf</i> file.
 <b>launchd</b>(8),
 <b>systemd</b>(8),
 and
-<b>xinetd</b>(8).
+<b>xinetd(8).</b>
 Simply enable the
 <b>cups-lpd</b>
 service using the corresponding control program.
index 2fae0b7f9dce86f5bddc39c610d8cbe8c03e47d9..bfe8e3dbb3d86206be7bd8cc600e274c9a2074f6 100644 (file)
@@ -155,10 +155,10 @@ The default is "Yes".
 <dd style="margin-left: 5.0em">Specifies how long an idle client connection remains open.
 The default is "30".
 <dt><a name="LimitIPP"></a><b>&lt;Limit </b><i>operation </i>...<b>> </b>... <b>&lt;/Limit></b>
-<dd style="margin-left: 5.0em">Specifies the IPP operations that are being limited inside a Policy section. IPP operation names are listed below in the section "IPP OPERATION NAMES".
+<dd style="margin-left: 5.0em">Specifies the IPP operations that are being limited inside a Policy section. IPP operation names are listed below in the section "IPP OPERATIONS".
 <dt><a name="Limit"></a><b>&lt;Limit </b><i>method </i>...<b>> </b>... <b>&lt;/Limit></b>
 <dd style="margin-left: 5.0em"><dt><a name="LimitExcept"></a><b>&lt;LimitExcept </b><i>method </i>...<b>> </b>... <b>&lt;/LimitExcept></b>
-<dd style="margin-left: 5.0em">Specifies the HTTP methods that are being limited inside a Location section. HTTP method names are listed below in the section "HTTP METHOD NAMES".
+<dd style="margin-left: 5.0em">Specifies the HTTP methods that are being limited inside a Location section. HTTP method names are listed below in the section "HTTP METHODS".
 <dt><a name="LimitRequestBody"></a><b>LimitRequestBody </b><i>size</i>
 <dd style="margin-left: 5.0em">Specifies the maximum size of print files, IPP requests, and HTML form data.
 The default is "0" which disables the limit check.
@@ -457,7 +457,7 @@ The following paths are commonly used when configuring
 <dt>/jobs
 <dd style="margin-left: 5.0em">The path for all jobs (hold-job, release-job, etc.)
 <dt>/jobs/id
-<dd style="margin-left: 5.0em">The path for the specified job
+<dd style="margin-left: 5.0em">The path for the specified job.
 <dt>/printers
 <dd style="margin-left: 5.0em">The path for all printers
 <dt>/printers/name