summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sweet <michael.r.sweet@gmail.com>2017-11-28 12:59:45 -0500
committerMichael Sweet <michael.r.sweet@gmail.com>2017-11-28 12:59:45 -0500
commit4f63d6cdafa4052f52fa15e8fc97650c558d45b4 (patch)
tree15c75a74a4f770d695dbb20098d36c6933f21f1d
parent27ee2c4dd70f4fc47d075b31ce37d1b1cacaa40e (diff)
downloadcups-4f63d6cdafa4052f52fa15e8fc97650c558d45b4.tar.gz
Add support for finishings-col (Issue #5180)
- cups/ppd-cache.c: Look for cupsFinishingTemplate option, finishings-col-database attribute. Add finishings-col with finishing-template. - cups/ppd-private.h: Add array of finishing-template names. - scheduler/printers.c: Add finishings-col-database.
-rw-r--r--CHANGES.md3
-rw-r--r--cups/ppd-cache.c63
-rw-r--r--cups/ppd-private.h1
-rw-r--r--doc/help/cupspm.epubbin219681 -> 220297 bytes
-rw-r--r--doc/help/cupspm.html29
-rw-r--r--doc/help/spec-ppd.html73
-rw-r--r--filter/spec-ppd.shtml72
-rw-r--r--scheduler/printers.c31
-rw-r--r--xcode/CUPS.xcodeproj/project.pbxproj2
9 files changed, 251 insertions, 23 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 0b370e110..a7a90062c 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,4 +1,4 @@
-CHANGES - 2.3b1 - 2017-11-27
+CHANGES - 2.3b1 - 2017-11-28
============================
@@ -41,4 +41,5 @@ Changes in CUPS v2.3b1
when available (Issue #5168)
- The cups-driverd program incorrectly stopped scanning PPDs as soon as a loop
was seen (Issue #5170)
+- IPP Everywhere PPDs now support finishing templates (Issue #5180)
diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c
index 925028790..042ba73cc 100644
--- a/cups/ppd-cache.c
+++ b/cups/ppd-cache.c
@@ -69,7 +69,8 @@ _cupsConvertOptions(
*media_type, /* media-type value */
*collate_str, /* multiple-document-handling value */
*color_attr_name, /* Supported color attribute */
- *mandatory; /* Mandatory attributes */
+ *mandatory, /* Mandatory attributes */
+ *finishing_template; /* Finishing template */
int num_finishings = 0, /* Number of finishing values */
finishings[10]; /* Finishing enum values */
ppd_choice_t *choice; /* Marked choice */
@@ -136,6 +137,8 @@ _cupsConvertOptions(
if (strcmp(mandatory, "copies") &&
strcmp(mandatory, "destination-uris") &&
strcmp(mandatory, "finishings") &&
+ strcmp(mandatory, "finishings-col") &&
+ strcmp(mandatory, "finishing-template") &&
strcmp(mandatory, "job-account-id") &&
strcmp(mandatory, "job-accounting-user-id") &&
strcmp(mandatory, "job-password") &&
@@ -358,10 +361,16 @@ _cupsConvertOptions(
* Map finishing options...
*/
- num_finishings = _ppdCacheGetFinishingValues(pc, num_options, options, (int)(sizeof(finishings) / sizeof(finishings[0])), finishings);
- if (num_finishings > 0)
+ if ((finishing_template = cupsGetOption("cupsFinishingTemplate", num_options, options)) == NULL)
+ finishing_template = cupsGetOption("finishing-template", num_options, options);
+
+ if (finishing_template)
{
- ippAddIntegers(request, IPP_TAG_JOB, IPP_TAG_ENUM, "finishings", num_finishings, finishings);
+ ipp_t *fin_col = ippNew(); /* finishings-col value */
+
+ ippAddString(fin_col, IPP_TAG_JOB, IPP_TAG_KEYWORD, "finishing-template", NULL, finishing_template);
+ ippAddCollection(request, IPP_TAG_JOB, "finishings-col", fin_col);
+ ippDelete(fin_col);
if (copies != finishings_copies && (keyword = cupsGetOption("job-impressions", num_options, options)) != NULL)
{
@@ -372,6 +381,23 @@ _cupsConvertOptions(
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-pages-per-set", atoi(keyword) / finishings_copies);
}
}
+ else
+ {
+ num_finishings = _ppdCacheGetFinishingValues(pc, num_options, options, (int)(sizeof(finishings) / sizeof(finishings[0])), finishings);
+ if (num_finishings > 0)
+ {
+ ippAddIntegers(request, IPP_TAG_JOB, IPP_TAG_ENUM, "finishings", num_finishings, finishings);
+
+ if (copies != finishings_copies && (keyword = cupsGetOption("job-impressions", num_options, options)) != NULL)
+ {
+ /*
+ * Send job-pages-per-set attribute to apply finishings correctly...
+ */
+
+ ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-pages-per-set", atoi(keyword) / finishings_copies);
+ }
+ }
+ }
return (copies);
}
@@ -863,6 +889,13 @@ _ppdCacheCreateWithFile(
cupsArrayAdd(pc->finishings, finishings);
}
+ else if (!_cups_strcasecmp(line, "FinishingTemplate"))
+ {
+ if (!pc->templates)
+ pc->templates = cupsArrayNew3((cups_array_func_t)strcmp, NULL, NULL, 0, (cups_acopy_func_t)_cupsStrAlloc, (cups_afree_func_t)_cupsStrFree);
+
+ cupsArrayAdd(pc->templates, value);
+ }
else if (!_cups_strcasecmp(line, "MaxCopies"))
pc->max_copies = atoi(value);
else if (!_cups_strcasecmp(line, "ChargeInfoURI"))
@@ -958,7 +991,8 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
*media_type, /* MediaType option */
*output_bin, /* OutputBin option */
*color_model, /* ColorModel option */
- *duplex; /* Duplex option */
+ *duplex, /* Duplex option */
+ *ppd_option; /* Other PPD option */
ppd_choice_t *choice; /* Current InputSlot/MediaType */
pwg_map_t *map; /* Current source/type map */
ppd_attr_t *ppd_attr; /* Current PPD preset attribute */
@@ -1695,8 +1729,6 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
* No IPP mapping data, try to map common/standard PPD keywords...
*/
- ppd_option_t *ppd_option; /* PPD option */
-
pc->finishings = cupsArrayNew3((cups_array_func_t)pwg_compare_finishings, NULL, NULL, 0, NULL, (cups_afree_func_t)pwg_free_finishings);
if ((ppd_option = ppdFindOption(ppd, "StapleLocation")) != NULL)
@@ -1798,6 +1830,14 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
}
}
+ if ((ppd_option = ppdFindOption(ppd, "cupsFinishingTemplate")) != NULL)
+ {
+ pc->templates = cupsArrayNew3((cups_array_func_t)strcmp, NULL, NULL, 0, (cups_acopy_func_t)_cupsStrAlloc, (cups_afree_func_t)_cupsStrFree);
+
+ for (choice = ppd_option->choices, i = ppd_option->num_choices; i > 0; choice ++, i --)
+ cupsArrayAdd(pc->templates, (void *)choice->choice);
+ }
+
/*
* Max copies...
*/
@@ -2730,7 +2770,7 @@ _ppdCacheWriteFile(
pwg_map_t *map; /* Current map */
_pwg_finishings_t *f; /* Current finishing option */
cups_option_t *option; /* Current option */
- const char *value; /* Filter/pre-filter value */
+ const char *value; /* String value */
char newfile[1024]; /* New filename */
@@ -2878,6 +2918,9 @@ _ppdCacheWriteFile(
cupsFilePutChar(fp, '\n');
}
+ for (value = (const char *)cupsArrayFirst(pc->templates); value; value = (const char *)cupsArrayNext(pc->templates))
+ cupsFilePutConf(fp, "FinishingTemplate", value);
+
/*
* Max copies...
*/
@@ -4036,8 +4079,8 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
cupsFilePrintf(fp, "*OpenUI *cupsFinishingTemplate/%s: PickOne\n", _cupsLangString(lang, _("Finishing Preset")));
cupsFilePuts(fp, "*OrderDependency: 10 AnySetup *cupsFinishingTemplate\n");
- cupsFilePuts(fp, "*DefaultcupsFinishingTemplate: None\n");
- cupsFilePrintf(fp, "*cupsFinishingTemplate None/%s: \"\"\n", _cupsLangString(lang, _("None")));
+ cupsFilePuts(fp, "*DefaultcupsFinishingTemplate: none\n");
+ cupsFilePrintf(fp, "*cupsFinishingTemplate none/%s: \"\"\n", _cupsLangString(lang, _("None")));
templates = cupsArrayNew((cups_array_func_t)strcmp, NULL);
count = ippGetCount(attr);
diff --git a/cups/ppd-private.h b/cups/ppd-private.h
index e7c0d6e5f..6cd168327 100644
--- a/cups/ppd-private.h
+++ b/cups/ppd-private.h
@@ -139,6 +139,7 @@ struct _ppd_cache_s /**** PPD cache and PWG conversion data ****/
*prefilters; /* cupsPreFilter values */
int single_file; /* cupsSingleFile value */
cups_array_t *finishings; /* cupsIPPFinishings values */
+ cups_array_t *templates; /* cupsFinishingTemplate values */
int max_copies, /* cupsMaxCopies value */
account_id, /* cupsJobAccountId value */
accounting_user_id; /* cupsJobAccountingUserId value */
diff --git a/doc/help/cupspm.epub b/doc/help/cupspm.epub
index 331d9be1d..e857f988b 100644
--- a/doc/help/cupspm.epub
+++ b/doc/help/cupspm.epub
Binary files differ
diff --git a/doc/help/cupspm.html b/doc/help/cupspm.html
index ba52cad6a..b07dadb00 100644
--- a/doc/help/cupspm.html
+++ b/doc/help/cupspm.html
@@ -6291,15 +6291,21 @@ are server-oriented...</p>
<p class="description">IPP operations</p>
<h4 class="constants">Constants</h4>
<table class="list"><tbody>
+ <tr><th>IPP_OP_ALLOCATE_PRINTER_RESOURCES </th> <td class="description">Allocate-Printer-Resources: Use resources for a printer.</td></tr>
<tr><th>IPP_OP_CANCEL_CURRENT_JOB </th> <td class="description">Cancel-Current-Job: Cancel the current job</td></tr>
<tr><th>IPP_OP_CANCEL_JOB </th> <td class="description">Cancel-Job: Cancel a job</td></tr>
<tr><th>IPP_OP_CANCEL_JOBS </th> <td class="description">Cancel-Jobs: Cancel all jobs (administrative)</td></tr>
<tr><th>IPP_OP_CANCEL_MY_JOBS </th> <td class="description">Cancel-My-Jobs: Cancel a user's jobs</td></tr>
+ <tr><th>IPP_OP_CANCEL_RESOURCE </th> <td class="description">Cancel-Resource: Uninstall a resource.</td></tr>
<tr><th>IPP_OP_CANCEL_SUBSCRIPTION <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></th> <td class="description">Cancel-Subscription: Cancel a subscription </td></tr>
<tr><th>IPP_OP_CLOSE_JOB </th> <td class="description">Close-Job: Close a job and start printing</td></tr>
<tr><th>IPP_OP_CREATE_JOB </th> <td class="description">Create-Job: Create an empty print job</td></tr>
<tr><th>IPP_OP_CREATE_JOB_SUBSCRIPTIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></th> <td class="description">Create-Job-Subscriptions: Create one of more job subscriptions </td></tr>
+ <tr><th>IPP_OP_CREATE_PRINTER </th> <td class="description">Create-Printer: Create a new service.</td></tr>
<tr><th>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></th> <td class="description">Create-Printer-Subscriptions: Create one or more printer subscriptions </td></tr>
+ <tr><th>IPP_OP_CREATE_RESOURCE </th> <td class="description">Create-Resource: Create a new (empty) resource.</td></tr>
+ <tr><th>IPP_OP_CREATE_RESOURCE_SUBSCRIPTIONS </th> <td class="description">Create-Resource-Subscriptions: Create event subscriptions for a resource.</td></tr>
+ <tr><th>IPP_OP_CREATE_SYSTEM_SUBSCRIPTIONS </th> <td class="description">Create-System-Subscriptions: Create event subscriptions for a system.</td></tr>
<tr><th>IPP_OP_CUPS_ADD_MODIFY_CLASS </th> <td class="description">CUPS-Add-Modify-Class: Add or modify a class</td></tr>
<tr><th>IPP_OP_CUPS_ADD_MODIFY_PRINTER </th> <td class="description">CUPS-Add-Modify-Printer: Add or modify a printer</td></tr>
<tr><th>IPP_OP_CUPS_AUTHENTICATE_JOB <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></th> <td class="description">CUPS-Authenticate-Job: Authenticate a job </td></tr>
@@ -6315,32 +6321,52 @@ are server-oriented...</p>
<tr><th>IPP_OP_CUPS_INVALID </th> <td class="description">Invalid operation name for <a href="#ippOpValue"><code>ippOpValue</code></a></td></tr>
<tr><th>IPP_OP_CUPS_MOVE_JOB </th> <td class="description">CUPS-Move-Job: Move a job to a different printer</td></tr>
<tr><th>IPP_OP_CUPS_SET_DEFAULT </th> <td class="description">CUPS-Set-Default: Set the default printer</td></tr>
+ <tr><th>IPP_OP_DEALLOCATE_PRINTER_RESOURCES </th> <td class="description">Deallocate-Printer-Resources: Stop using resources for a printer.</td></tr>
+ <tr><th>IPP_OP_DELETE_PRINTER </th> <td class="description">Delete-Printer: Delete an existing service.</td></tr>
+ <tr><th>IPP_OP_DISABLE_ALL_PRINTERS </th> <td class="description">Disable-All-Printers: Stop accepting new jobs on all services.</td></tr>
<tr><th>IPP_OP_DISABLE_PRINTER </th> <td class="description">Disable-Printer: Reject new jobs for a printer</td></tr>
+ <tr><th>IPP_OP_ENABLE_ALL_PRINTERS </th> <td class="description">Enable-All-Printers: Start accepting new jobs on all services.</td></tr>
<tr><th>IPP_OP_ENABLE_PRINTER </th> <td class="description">Enable-Printer: Accept new jobs for a printer</td></tr>
<tr><th>IPP_OP_GET_JOBS </th> <td class="description">Get-Jobs: Get a list of jobs</td></tr>
<tr><th>IPP_OP_GET_JOB_ATTRIBUTES </th> <td class="description">Get-Job-Attribute: Get information about a job</td></tr>
<tr><th>IPP_OP_GET_NOTIFICATIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></th> <td class="description">Get-Notifications: Get notification events </td></tr>
+ <tr><th>IPP_OP_GET_PRINTERS </th> <td class="description">Get-Printers: Get a list of services.</td></tr>
<tr><th>IPP_OP_GET_PRINTER_ATTRIBUTES </th> <td class="description">Get-Printer-Attributes: Get information about a printer</td></tr>
<tr><th>IPP_OP_GET_PRINTER_SUPPORTED_VALUES </th> <td class="description">Get-Printer-Supported-Values: Get supported values</td></tr>
<tr><th>IPP_OP_GET_SUBSCRIPTIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></th> <td class="description">Get-Subscriptions: Get list of subscriptions </td></tr>
<tr><th>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></th> <td class="description">Get-Subscription-Attributes: Get subscription information </td></tr>
+ <tr><th>IPP_OP_GET_SYSTEM_ATTRIBUTES </th> <td class="description">Get-System-Attributes: Get system object attributes.</td></tr>
+ <tr><th>IPP_OP_GET_SYSTEM_SUPPORTED_VALUES </th> <td class="description">Get-System-Supported-Values: Get supported values for system object attributes.</td></tr>
<tr><th>IPP_OP_HOLD_JOB </th> <td class="description">Hold-Job: Hold a job for printing</td></tr>
<tr><th>IPP_OP_HOLD_NEW_JOBS </th> <td class="description">Hold-New-Jobs: Hold new jobs</td></tr>
<tr><th>IPP_OP_IDENTIFY_PRINTER </th> <td class="description">Identify-Printer: Make the printer beep, flash, or display a message for identification</td></tr>
+ <tr><th>IPP_OP_INSTALL_RESOURCE </th> <td class="description">Install-Resource: Install a resource.</td></tr>
+ <tr><th>IPP_OP_PAUSE_ALL_PRINTERS </th> <td class="description">Pause-All-Printers: Stop all services immediately.</td></tr>
+ <tr><th>IPP_OP_PAUSE_ALL_PRINTERS_AFTER_CURRENT_JOB </th> <td class="description">Pause-All-Printers-After-Current-Job: Stop all services after processing the current jobs.</td></tr>
<tr><th>IPP_OP_PAUSE_PRINTER </th> <td class="description">Pause-Printer: Stop a printer</td></tr>
<tr><th>IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB </th> <td class="description">Pause-Printer-After-Current-Job: Stop printer after the current job</td></tr>
<tr><th>IPP_OP_PRINT_JOB </th> <td class="description">Print-Job: Print a single file</td></tr>
<tr><th>IPP_OP_PROMOTE_JOB </th> <td class="description">Promote-Job: Promote a job to print sooner</td></tr>
+ <tr><th>IPP_OP_REGISTER_OUTPUT_DEVICE </th> <td class="description">Register-Output-Device: Register a remote service.</td></tr>
<tr><th>IPP_OP_RELEASE_HELD_NEW_JOBS </th> <td class="description">Release-Held-New-Jobs: Release new jobs that were previously held</td></tr>
<tr><th>IPP_OP_RELEASE_JOB </th> <td class="description">Release-Job: Release a job for printing</td></tr>
<tr><th>IPP_OP_RENEW_SUBSCRIPTION <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></th> <td class="description">Renew-Subscription: Renew a printer subscription </td></tr>
<tr><th>IPP_OP_RESTART_JOB <span class="info">&#160;DEPRECATED&#160;</span></th> <td class="description">Restart-Job: Reprint a job </td></tr>
+ <tr><th>IPP_OP_RESTART_SYSTEM </th> <td class="description">Restart-System: Restart all services.</td></tr>
+ <tr><th>IPP_OP_RESUME_ALL_PRINTERS </th> <td class="description">Resume-All-Printers: Start job processing on all services.</td></tr>
<tr><th>IPP_OP_RESUME_JOB </th> <td class="description">Resume-Job: Resume the current job</td></tr>
<tr><th>IPP_OP_RESUME_PRINTER </th> <td class="description">Resume-Printer: Start a printer</td></tr>
<tr><th>IPP_OP_SCHEDULE_JOB_AFTER </th> <td class="description">Schedule-Job-After: Schedule a job to print after another</td></tr>
<tr><th>IPP_OP_SEND_DOCUMENT </th> <td class="description">Send-Document: Add a file to a job</td></tr>
+ <tr><th>IPP_OP_SEND_RESOURCE_DATA </th> <td class="description">Send-Resource-Data: Upload the data for a resource.</td></tr>
<tr><th>IPP_OP_SET_JOB_ATTRIBUTES </th> <td class="description">Set-Job-Attributes: Set job values</td></tr>
<tr><th>IPP_OP_SET_PRINTER_ATTRIBUTES </th> <td class="description">Set-Printer-Attributes: Set printer values</td></tr>
+ <tr><th>IPP_OP_SET_RESOURCE_ATTRIBUTES </th> <td class="description">Set-Resource-Attributes: Set resource object attributes.</td></tr>
+ <tr><th>IPP_OP_SET_SYSTEM_ATTRIBUTES </th> <td class="description">Set-System-Attributes: Set system object attributes.</td></tr>
+ <tr><th>IPP_OP_SHUTDOWN_ALL_PRINTERS </th> <td class="description">Shutdown-All-Printers: Shutdown all services.</td></tr>
+ <tr><th>IPP_OP_SHUTDOWN_ONE_PRINTER </th> <td class="description">Shutdown-One-Printer: Shutdown a service.</td></tr>
+ <tr><th>IPP_OP_STARTUP_ALL_PRINTERS </th> <td class="description">Startup-All-Printers: Startup all services.</td></tr>
+ <tr><th>IPP_OP_STARTUP_ONE_PRINTER </th> <td class="description">Startup-One-Printer: Start a service.</td></tr>
<tr><th>IPP_OP_SUSPEND_CURRENT_JOB </th> <td class="description">Suspend-Current-Job: Suspend the current job</td></tr>
<tr><th>IPP_OP_VALIDATE_JOB </th> <td class="description">Validate-Job: Validate job values prior to submission</td></tr>
</tbody></table>
@@ -6461,6 +6487,7 @@ are server-oriented...</p>
<tr><th>IPP_TAG_DATE </th> <td class="description">Date/time value</td></tr>
<tr><th>IPP_TAG_DEFAULT </th> <td class="description">Default value</td></tr>
<tr><th>IPP_TAG_DELETEATTR </th> <td class="description">Delete-attribute value</td></tr>
+ <tr><th>IPP_TAG_DOCUMENT </th> <td class="description">Document group</td></tr>
<tr><th>IPP_TAG_END </th> <td class="description">End-of-attributes</td></tr>
<tr><th>IPP_TAG_ENUM </th> <td class="description">Enumeration value</td></tr>
<tr><th>IPP_TAG_EVENT_NOTIFICATION </th> <td class="description">Event group</td></tr>
@@ -6477,8 +6504,10 @@ are server-oriented...</p>
<tr><th>IPP_TAG_PRINTER </th> <td class="description">Printer group</td></tr>
<tr><th>IPP_TAG_RANGE </th> <td class="description">Range value</td></tr>
<tr><th>IPP_TAG_RESOLUTION </th> <td class="description">Resolution value</td></tr>
+ <tr><th>IPP_TAG_RESOURCE </th> <td class="description">Resource group</td></tr>
<tr><th>IPP_TAG_STRING </th> <td class="description">Octet string value</td></tr>
<tr><th>IPP_TAG_SUBSCRIPTION </th> <td class="description">Subscription group</td></tr>
+ <tr><th>IPP_TAG_SYSTEM </th> <td class="description">System group</td></tr>
<tr><th>IPP_TAG_TEXT </th> <td class="description">Text value</td></tr>
<tr><th>IPP_TAG_TEXTLANG </th> <td class="description">Text-with-language value</td></tr>
<tr><th>IPP_TAG_UNKNOWN </th> <td class="description">Unknown value</td></tr>
diff --git a/doc/help/spec-ppd.html b/doc/help/spec-ppd.html
index 06f5769a8..dd2c07a15 100644
--- a/doc/help/spec-ppd.html
+++ b/doc/help/spec-ppd.html
@@ -419,6 +419,7 @@ div.contents ul.subcontents li {
<li><a href="#cupsFax">cupsFax</a></li>
<li><a href="#cupsFilter">cupsFilter</a></li>
<li><a href="#cupsFilter2">cupsFilter2</a></li>
+ <li><a href="#cupsFinishingTemplate">cupsFinishingTemplate</a></li>
<li><a href="#cupsFlipDuplex">cupsFlipDuplex</a></li>
<li><a href="#cupsIPPFinishings">cupsIPPFinishings</a></li>
<li><a href="#cupsIPPReason">cupsIPPReason</a></li>
@@ -491,6 +492,7 @@ LINE-END = CR / LF / CR LF
<p>CUPS supports several methods of auto-configuration via PPD keywords.</p>
+
<h3><span class='info'>macOS 10.5</span><a name='APAutoSetupTool'>APAutoSetupTool</a></h3>
<p class='summary'>*APAutoSetupTool: "/LibraryPrinters/vendor/filename"</p>
@@ -506,6 +508,7 @@ LINE-END = CR / LF / CR LF
*APAutoSetupTool: "/Library/Printers/vendor/Tools/autosetuptool"
</pre>
+
<h3><span class='info'>macOS 10.2/CUPS 1.4</span><a name='QUERYKEYWORD'>?MainKeyword</a></h3>
<p class='summary'>*?<i>MainKeyword</i>: "<br>
@@ -535,6 +538,7 @@ LINE-END = CR / LF / CR LF
*CloseUI: OptionDuplex
</pre>
+
<h3><span class='info'>macOS 10.4/CUPS 1.5</span><a name='OID'>OIDMainKeyword</a></h3>
<p class='summary'>*?OID<i>MainKeyword</i>: ".n.n.n..."<br>
@@ -566,6 +570,7 @@ LINE-END = CR / LF / CR LF
</blockquote>
+
<h3><span class='info'>Deprecated</span><a name='cupsColorProfile'>cupsColorProfile</a></h3>
<p class='summary'>*cupsColorProfile Resolution/MediaType: "density gamma m00 m01 m02 m10 m11 m12 m20 m21 m22"</p>
@@ -642,6 +647,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
*cupsICCQualifier3: Resolution
</pre>
+
<h3><span class='info'>macOS 10.4</span><a name='APCustom'>Custom Color Matching Support</a></h3>
<p class='summary'>*<a href='#APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a>: true<br>
@@ -743,6 +749,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
</blockquote>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIConstraints'>cupsUIConstraints</a></h3>
<p class='summary'>*cupsUIConstraints resolver: "*Keyword1 *Keyword2 ..."<br>
@@ -773,6 +780,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
*cupsUIConstraints photo: "*OutputMode Photo *MediaType Transparency *Resolution 1200dpi"
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIResolver'>cupsUIResolver</a></h3>
<p class='summary'>*cupsUIResolver resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
@@ -990,6 +998,7 @@ option value is "1234" then CUPS will output the string "@PJL SET PASSCODE=1234"
<p>The resulting dictionary sets the page device attributes that are sent to your raster driver in the page header.</p>
+
<h3>Custom Page Size Code</h3>
<p>There are many possible implementations of the <tt>CustomPageSize</tt> code. For CUPS raster drivers, the following code is recommended:</p>
@@ -1003,6 +1012,7 @@ option value is "1234" then CUPS will output the string "@PJL SET PASSCODE=1234"
*CustomPageSize True: "pop pop pop &lt;&lt;/PageSize[5 -2 roll]/ImagingBBox null&gt;&gt;setpagedevice"
</pre>
+
<h3>Supported PostScript Operators</h3>
<p>CUPS supports the following PostScript operators in addition to the usual PostScript number, string (literal and hex-encoded), boolean, null, and name values:</p>
@@ -1062,6 +1072,7 @@ PRE B {
</blockquote>
+
<h3>Supported Page Device Attributes</h3>
<p>Table 2 shows the supported page device attributes along with PostScript code examples.</p>
@@ -1333,6 +1344,7 @@ PRE B {
<p>The CUPS media keywords allow drivers to specify alternate custom page
size limits based on up to two options.</p>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier2'>cupsMediaQualifier2</a></h3>
<p class='summary'>*cupsMediaQualifier2: MainKeyword</p>
@@ -1352,6 +1364,7 @@ custom page size limits.</p>
*cupsMinSize ..Photo: "300 300"
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier3'>cupsMediaQualifier3</a></h3>
<p class='summary'>*cupsMediaQualifier3: MainKeyword</p>
@@ -1371,6 +1384,7 @@ custom page size limits.</p>
*cupsMinSize ..Photo: "300 300"
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMinSize'>cupsMinSize</a></h3>
<p class='summary'>*cupsMinSize .Qualifier2.Qualifier3: "width length"<br>
@@ -1394,6 +1408,7 @@ are used to identify options to use for matching.</p>
*cupsMinSize ..Photo: "300 300"
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMaxSize'>cupsMaxSize</a></h3>
<p class='summary'>*cupsMaxSize .Qualifier2.Qualifier3: "width length"<br>
@@ -1531,6 +1546,7 @@ will be ignored.</p>
<p>Also see the related <a href='#APDuplexRequiresFlippedMargin'><tt>APDuplexRequiresFlippedMargin</tt></a>
keyword.</p>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsCommands'>cupsCommands</a></h3>
<p class='summary'>*cupsCommands: "name name2 ... nameN"</p>
@@ -1562,6 +1578,7 @@ printing is selected. The default value is <code>false</code>.</p>
*cupsEvenDuplex: true
</pre>
+
<h3><a name='cupsFax'>cupsFax</a></h3>
<p class='summary'>*cupsFax: boolean</p>
@@ -1574,6 +1591,7 @@ printing is selected. The default value is <code>false</code>.</p>
*cupsFax: true
</pre>
+
<h3><a name='cupsFilter'>cupsFilter</a></h3>
<p class='summary'>*cupsFilter: "source/type cost program"</p>
@@ -1596,6 +1614,7 @@ the special filter program "-" may be specified.</p>
*cupsFilter: "application/vnd.cups-postscript 0 -"
</pre>
+
<h3><span class='info'>CUPS 1.5</span><a name='cupsFilter2'>cupsFilter2</a></h3>
<p class='summary'>*cupsFilter2: "source/type destination/type cost program"</p>
@@ -1621,6 +1640,26 @@ the special filter program "-" may be specified.</p>
*cupsFilter2: "application/vnd.cups-postscript application/postscript 0 -"
</pre>
+
+<h3><span class='info'>CUPS 2.3</span><a name='cupsFinishingTemplate'>cupsFinishingTemplate</a></h3>
+
+<p class='summary'>*cupsFinishingTemplate name/text: ""</p>
+
+<p>This option keyword specifies a finishing template (preset) that applies zero or more finishing processes to a job. Unlike <a href="#cupsIPPFinishings"><tt>cupsIPPFinishings</tt></a>, only one template can be selected by the user. PPD files also generally apply a constraint between this option and other finishing options like <tt>Booklet</tt>, <tt>FoldType</tt>, <tt>PunchMedia</tt>, and <tt>StapleWhen</tt>.</p>
+
+<p>Examples:</p>
+
+<pre class='command'>
+*cupsFinishingTemplate none/None: ""
+*cupsFinishingTemplate fold/Letter Fold: ""
+*cupsFinishingTemplate punch/2/3-Hole Punch: ""
+*cupsFinishingTemplate staple/Corner Staple: ""
+*cupsFinishingTemplate staple-dual/Double Staple: ""
+*cupsFinishingTemplate staple-and-fold/Corner Staple and Letter Fold: ""
+*cupsFinishingTemplate staple-and-punch/Corner Staple and 2/3-Hole Punch: ""
+</pre>
+
+
<h3><span class='info'>Deprecated</span><a name='cupsFlipDuplex'>cupsFlipDuplex</a></h3>
<p class='summary'>*cupsFlipDuplex: boolean</p>
@@ -1656,6 +1695,7 @@ Ghostscript can use:</p>
*cupsFlipDuplex: true
</pre></blockquote>
+
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsIPPFinishings'>cupsIPPFinishings</a></h3>
<p class='summary'>*cupsIPPFinishings number/text: "*Option Choice ..."</p>
@@ -1672,6 +1712,7 @@ values to PPD options and choices.</p>
*cupsIPPFinishings 21/staple-bottom-left: "*StapleLocation SingleLandscape"
</pre>
+
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsIPPReason'>cupsIPPReason</a></h3>
<p class='summary'>*cupsIPPReason reason/Reason Text: "optional URIs"</p>
@@ -1712,6 +1753,7 @@ http://www.vendor.com/help"
*End
</pre>
+
<h3><span class='info'>CUPS 1.5</span><a name='cupsIPPSupplies'>cupsIPPSupplies</a></h3>
<p class='summary'>*cupsIPPSupplies: boolean</p>
@@ -1813,6 +1855,7 @@ hardware. The default value is <code>false</code>.</p>
*cupsManualCopies: true
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMarkerName'>cupsMarkerName</a></h3>
<p class='summary'>*cupsMarkerName/Name Text: ""</p>
@@ -1827,6 +1870,7 @@ generated by the driver to human readable text.</p>
*cupsMarkerName cyanToner/Cyan Toner: ""
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMarkerNotice'>cupsMarkerNotice</a></h3>
<p class='summary'>*cupsMarkerNotice: "disclaimer text"</p>
@@ -1841,6 +1885,7 @@ are approximate".</p>
*cupsMarkerNotice: "Supply levels are approximate."
</pre>
+
<h3><span class='info'>CUPS 1.6/macOS 10.8</span><a name='cupsMaxCopies'>cupsMaxCopies</a></h3>
<p class='summary'>*cupsMaxCopies: integer</p>
@@ -1854,6 +1899,7 @@ are approximate".</p>
*cupsMaxCopies: 99
</pre>
+
<h3><a name='cupsModelNumber'>cupsModelNumber</a></h3>
<p class='summary'>*cupsModelNumber: number</p>
@@ -1885,6 +1931,7 @@ assumed.</p>
*cupsPJLCharset: "UTF-8"
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsPJLDisplay'>cupsPJLDisplay</a></h3>
<p class='summary'>*cupsPJLDisplay: "what"</p>
@@ -1904,6 +1951,7 @@ to use "@PJL RDYMSG DISPLAY". The default is "job".</p>
*cupsPJLDisplay: "none"
</pre>
+
<h3><span class='info'>CUPS 1.2/macOS 10.5</span><a name='cupsPortMonitor'>cupsPortMonitor</a></h3>
<p class='summary'>*cupsPortMonitor urischeme/Descriptive Text: "port monitor"</p>
@@ -1936,6 +1984,7 @@ to disable the port monitor for the given URI scheme.</p>
*cupsPortMonitor usb/USB Status Monitor: "epson-usb"
</pre>
+
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsPreFilter'>cupsPreFilter</a></h3>
<p class='summary'>*cupsPreFilter: "source/type cost program"</p>
@@ -1979,6 +2028,7 @@ before the filter that accepts the given MIME type.</p>
*CloseUI: *cupsPrintQuality
</pre>
+
<h3><span class='info'>CUPS 1.5</span><a name='cupsSingleFile'>cupsSingleFile</a></h3>
<p class='summary'>*cupsSingleFile: Boolean</p>
@@ -1995,6 +2045,7 @@ before the filter that accepts the given MIME type.</p>
*cupsSingleFile: True
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsSNMPSupplies'>cupsSNMPSupplies</a></h3>
<p class='summary'>*cupsSNMPSupplies: boolean</p>
@@ -2010,6 +2061,7 @@ the standard SNMP Printer MIB OIDs for supply levels. The default value is
*cupsSNMPSupplies: False
</pre>
+
<h3><a name='cupsVersion'>cupsVersion</a></h3>
<p class='summary'>*cupsVersion: major.minor</p>
@@ -2068,6 +2120,7 @@ in order to be usable with all applications.</p>
*APDialogExtension: "/Library/Printers/vendor/options.plugin"
</pre>
+
<h3><span class='info'>macOS 10.4</span><a name='APDuplexRequiresFlippedMargin'>APDuplexRequiresFlippedMargin</a></h3>
<p class='summary'>*APDuplexRequiresFlippedMargin: boolean</p>
@@ -2150,6 +2203,7 @@ and the <tt>Tumble</tt> page attribute.</p>
<p>Also see the related <a href='#cupsBackSide'><tt>cupsBackSide</tt></a>
keyword.</p>
+
<h3><a name='APHelpBook'>APHelpBook</a></h3>
<p class='summary'>*APHelpBook: "bundle URL"</p>
@@ -2165,6 +2219,7 @@ looking up IPP reason codes for this printer driver. The
*APHelpBook: "file:///Library/Printers/vendor/Help.bundle"
</pre>
+
<h3><span class='info'>macOS 10.6</span><a name='APICADriver'>APICADriver</a></h3>
<p class='summary'>*APICADriver: boolean</p>
@@ -2179,6 +2234,7 @@ Architecture (ICA) driver for scanning. The default is <tt>False</tt>.</p>
*APScanAppBundleID: "com.apple.ImageCaptureApp"
</pre>
+
<h3><span class='info'>macOS 10.3</span><a name='APPrinterIconPath'>APPrinterIconPath</a></h3>
<p class='summary'>*APPrinterIconPath: "/Library/Printers/vendor/filename.icns"</p>
@@ -2193,6 +2249,7 @@ displaying the printer. The file must be in the Apple icon format.</p>
*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.icns"
</pre>
+
<h3><span class='info'>macOS 10.4</span><a name='APPrinterLowInkTool'>APPrinterLowInkTool</a></h3>
<p class='summary'>*APPrinterLowInkTool: "/Library/Printers/vendor/program"</p>
@@ -2210,6 +2267,7 @@ Technical Note TN2144</a> for more information.</p>
*APPrinterLowInkTool: "/Library/Printers/vendor/Tools/lowinktool"
</pre>
+
<h3><span class='info'>macOS 10.5</span><a name='APPrinterPreset'>APPrinterPreset</a></h3>
<p class='summary'>*APPrinterPreset name/text: "*Option Choice ..."</p>
@@ -2280,6 +2338,7 @@ choice (*MainKeyword OptionKeyword) or a preset identifier and value
*fr.APPrinterPreset Photo_on_Photo_Paper/Photo sur papier photographique: ""
</pre>
+
<h3><span class='info'>macOS 10.3</span><a name='APPrinterUtilityPath'>APPrinterUtilityPath</a></h3>
<p class='summary'>*APPrinterPrinterUtilityPath: "/Library/Printers/vendor/filename.app"</p>
@@ -2295,6 +2354,7 @@ information.</p>
*APPrinterPrinterUtilityPath: "/Library/Printers/vendor/Tools/utility.app"
</pre>
+
<h3><span class='info'>macOS 10.6</span><a name='APScannerOnly'>APScannerOnly</a></h3>
<p class='summary'>*APScannerOnly: boolean</p>
@@ -2309,6 +2369,7 @@ capabilities. The default is <tt>False</tt>.</p>
*APScannerOnly: True
</pre>
+
<h3><span class='info'>macOS 10.3</span><a name='APScanAppBundleID'>APScanAppBundleID</a></h3>
<p class='summary'>*APScanAppBundleID: "bundle ID"</p>
@@ -2326,6 +2387,15 @@ the device.</p>
<h2 class='title'><a name='HISTORY'>Change History</a></h2>
+<h3>Changes in CUPS 2.3</h3>
+
+<ul>
+
+ <li>Added <a href="#cupsFinishingTemplate"><tt>cupsFinishingTemplate</tt></a> option.</li>
+
+</ul>
+
+
<h3>Changes in CUPS 1.7</h3>
<ul>
@@ -2442,6 +2512,7 @@ the device.</p>
</ul>
+
<h3>Changes in CUPS 1.2.8</h3>
<ul>
@@ -2451,6 +2522,7 @@ the device.</p>
</ul>
+
<h3>Changes in CUPS 1.2</h3>
<ul>
@@ -2476,6 +2548,7 @@ the device.</p>
</ul>
+
<h3>Changes in CUPS 1.1</h3>
<ul>
diff --git a/filter/spec-ppd.shtml b/filter/spec-ppd.shtml
index 3b7543082..6f84dbdab 100644
--- a/filter/spec-ppd.shtml
+++ b/filter/spec-ppd.shtml
@@ -30,6 +30,7 @@ LINE-END = CR / LF / CR LF
<p>CUPS supports several methods of auto-configuration via PPD keywords.</p>
+
<h3><span class='info'>macOS 10.5</span><a name='APAutoSetupTool'>APAutoSetupTool</a></h3>
<p class='summary'>*APAutoSetupTool: "/LibraryPrinters/vendor/filename"</p>
@@ -45,6 +46,7 @@ LINE-END = CR / LF / CR LF
*APAutoSetupTool: "/Library/Printers/vendor/Tools/autosetuptool"
</pre>
+
<h3><span class='info'>macOS 10.2/CUPS 1.4</span><a name='QUERYKEYWORD'>?MainKeyword</a></h3>
<p class='summary'>*?<i>MainKeyword</i>: "<br>
@@ -74,6 +76,7 @@ LINE-END = CR / LF / CR LF
*CloseUI: OptionDuplex
</pre>
+
<h3><span class='info'>macOS 10.4/CUPS 1.5</span><a name='OID'>OIDMainKeyword</a></h3>
<p class='summary'>*?OID<i>MainKeyword</i>: ".n.n.n..."<br>
@@ -105,6 +108,7 @@ LINE-END = CR / LF / CR LF
</blockquote>
+
<h3><span class='info'>Deprecated</span><a name='cupsColorProfile'>cupsColorProfile</a></h3>
<p class='summary'>*cupsColorProfile Resolution/MediaType: "density gamma m00 m01 m02 m10 m11 m12 m20 m21 m22"</p>
@@ -181,6 +185,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
*cupsICCQualifier3: Resolution
</pre>
+
<h3><span class='info'>macOS 10.4</span><a name='APCustom'>Custom Color Matching Support</a></h3>
<p class='summary'>*<a href='#APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a>: true<br>
@@ -282,6 +287,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
</blockquote>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIConstraints'>cupsUIConstraints</a></h3>
<p class='summary'>*cupsUIConstraints resolver: "*Keyword1 *Keyword2 ..."<br>
@@ -312,6 +318,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
*cupsUIConstraints photo: "*OutputMode Photo *MediaType Transparency *Resolution 1200dpi"
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIResolver'>cupsUIResolver</a></h3>
<p class='summary'>*cupsUIResolver resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
@@ -529,6 +536,7 @@ option value is "1234" then CUPS will output the string "@PJL SET PASSCODE=1234"
<p>The resulting dictionary sets the page device attributes that are sent to your raster driver in the page header.</p>
+
<h3>Custom Page Size Code</h3>
<p>There are many possible implementations of the <tt>CustomPageSize</tt> code. For CUPS raster drivers, the following code is recommended:</p>
@@ -542,6 +550,7 @@ option value is "1234" then CUPS will output the string "@PJL SET PASSCODE=1234"
*CustomPageSize True: "pop pop pop &lt;&lt;/PageSize[5 -2 roll]/ImagingBBox null&gt;&gt;setpagedevice"
</pre>
+
<h3>Supported PostScript Operators</h3>
<p>CUPS supports the following PostScript operators in addition to the usual PostScript number, string (literal and hex-encoded), boolean, null, and name values:</p>
@@ -601,6 +610,7 @@ PRE B {
</blockquote>
+
<h3>Supported Page Device Attributes</h3>
<p>Table 2 shows the supported page device attributes along with PostScript code examples.</p>
@@ -872,6 +882,7 @@ PRE B {
<p>The CUPS media keywords allow drivers to specify alternate custom page
size limits based on up to two options.</p>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier2'>cupsMediaQualifier2</a></h3>
<p class='summary'>*cupsMediaQualifier2: MainKeyword</p>
@@ -891,6 +902,7 @@ custom page size limits.</p>
*cupsMinSize ..Photo: "300 300"
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier3'>cupsMediaQualifier3</a></h3>
<p class='summary'>*cupsMediaQualifier3: MainKeyword</p>
@@ -910,6 +922,7 @@ custom page size limits.</p>
*cupsMinSize ..Photo: "300 300"
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMinSize'>cupsMinSize</a></h3>
<p class='summary'>*cupsMinSize .Qualifier2.Qualifier3: "width length"<br>
@@ -933,6 +946,7 @@ are used to identify options to use for matching.</p>
*cupsMinSize ..Photo: "300 300"
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMaxSize'>cupsMaxSize</a></h3>
<p class='summary'>*cupsMaxSize .Qualifier2.Qualifier3: "width length"<br>
@@ -1070,6 +1084,7 @@ will be ignored.</p>
<p>Also see the related <a href='#APDuplexRequiresFlippedMargin'><tt>APDuplexRequiresFlippedMargin</tt></a>
keyword.</p>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsCommands'>cupsCommands</a></h3>
<p class='summary'>*cupsCommands: "name name2 ... nameN"</p>
@@ -1101,6 +1116,7 @@ printing is selected. The default value is <code>false</code>.</p>
*cupsEvenDuplex: true
</pre>
+
<h3><a name='cupsFax'>cupsFax</a></h3>
<p class='summary'>*cupsFax: boolean</p>
@@ -1113,6 +1129,7 @@ printing is selected. The default value is <code>false</code>.</p>
*cupsFax: true
</pre>
+
<h3><a name='cupsFilter'>cupsFilter</a></h3>
<p class='summary'>*cupsFilter: "source/type cost program"</p>
@@ -1135,6 +1152,7 @@ the special filter program "-" may be specified.</p>
*cupsFilter: "application/vnd.cups-postscript 0 -"
</pre>
+
<h3><span class='info'>CUPS 1.5</span><a name='cupsFilter2'>cupsFilter2</a></h3>
<p class='summary'>*cupsFilter2: "source/type destination/type cost program"</p>
@@ -1160,6 +1178,26 @@ the special filter program "-" may be specified.</p>
*cupsFilter2: "application/vnd.cups-postscript application/postscript 0 -"
</pre>
+
+<h3><span class='info'>CUPS 2.3</span><a name='cupsFinishingTemplate'>cupsFinishingTemplate</a></h3>
+
+<p class='summary'>*cupsFinishingTemplate name/text: ""</p>
+
+<p>This option keyword specifies a finishing template (preset) that applies zero or more finishing processes to a job. Unlike <a href="#cupsIPPFinishings"><tt>cupsIPPFinishings</tt></a>, only one template can be selected by the user. PPD files also generally apply a constraint between this option and other finishing options like <tt>Booklet</tt>, <tt>FoldType</tt>, <tt>PunchMedia</tt>, and <tt>StapleWhen</tt>.</p>
+
+<p>Examples:</p>
+
+<pre class='command'>
+*cupsFinishingTemplate none/None: ""
+*cupsFinishingTemplate fold/Letter Fold: ""
+*cupsFinishingTemplate punch/2/3-Hole Punch: ""
+*cupsFinishingTemplate staple/Corner Staple: ""
+*cupsFinishingTemplate staple-dual/Double Staple: ""
+*cupsFinishingTemplate staple-and-fold/Corner Staple and Letter Fold: ""
+*cupsFinishingTemplate staple-and-punch/Corner Staple and 2/3-Hole Punch: ""
+</pre>
+
+
<h3><span class='info'>Deprecated</span><a name='cupsFlipDuplex'>cupsFlipDuplex</a></h3>
<p class='summary'>*cupsFlipDuplex: boolean</p>
@@ -1195,6 +1233,7 @@ Ghostscript can use:</p>
*cupsFlipDuplex: true
</pre></blockquote>
+
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsIPPFinishings'>cupsIPPFinishings</a></h3>
<p class='summary'>*cupsIPPFinishings number/text: "*Option Choice ..."</p>
@@ -1211,6 +1250,7 @@ values to PPD options and choices.</p>
*cupsIPPFinishings 21/staple-bottom-left: "*StapleLocation SingleLandscape"
</pre>
+
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsIPPReason'>cupsIPPReason</a></h3>
<p class='summary'>*cupsIPPReason reason/Reason Text: "optional URIs"</p>
@@ -1251,6 +1291,7 @@ http://www.vendor.com/help"
*End
</pre>
+
<h3><span class='info'>CUPS 1.5</span><a name='cupsIPPSupplies'>cupsIPPSupplies</a></h3>
<p class='summary'>*cupsIPPSupplies: boolean</p>
@@ -1352,6 +1393,7 @@ hardware. The default value is <code>false</code>.</p>
*cupsManualCopies: true
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMarkerName'>cupsMarkerName</a></h3>
<p class='summary'>*cupsMarkerName/Name Text: ""</p>
@@ -1366,6 +1408,7 @@ generated by the driver to human readable text.</p>
*cupsMarkerName cyanToner/Cyan Toner: ""
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMarkerNotice'>cupsMarkerNotice</a></h3>
<p class='summary'>*cupsMarkerNotice: "disclaimer text"</p>
@@ -1380,6 +1423,7 @@ are approximate".</p>
*cupsMarkerNotice: "Supply levels are approximate."
</pre>
+
<h3><span class='info'>CUPS 1.6/macOS 10.8</span><a name='cupsMaxCopies'>cupsMaxCopies</a></h3>
<p class='summary'>*cupsMaxCopies: integer</p>
@@ -1393,6 +1437,7 @@ are approximate".</p>
*cupsMaxCopies: 99
</pre>
+
<h3><a name='cupsModelNumber'>cupsModelNumber</a></h3>
<p class='summary'>*cupsModelNumber: number</p>
@@ -1424,6 +1469,7 @@ assumed.</p>
*cupsPJLCharset: "UTF-8"
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsPJLDisplay'>cupsPJLDisplay</a></h3>
<p class='summary'>*cupsPJLDisplay: "what"</p>
@@ -1443,6 +1489,7 @@ to use "@PJL RDYMSG DISPLAY". The default is "job".</p>
*cupsPJLDisplay: "none"
</pre>
+
<h3><span class='info'>CUPS 1.2/macOS 10.5</span><a name='cupsPortMonitor'>cupsPortMonitor</a></h3>
<p class='summary'>*cupsPortMonitor urischeme/Descriptive Text: "port monitor"</p>
@@ -1475,6 +1522,7 @@ to disable the port monitor for the given URI scheme.</p>
*cupsPortMonitor usb/USB Status Monitor: "epson-usb"
</pre>
+
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsPreFilter'>cupsPreFilter</a></h3>
<p class='summary'>*cupsPreFilter: "source/type cost program"</p>
@@ -1518,6 +1566,7 @@ before the filter that accepts the given MIME type.</p>
*CloseUI: *cupsPrintQuality
</pre>
+
<h3><span class='info'>CUPS 1.5</span><a name='cupsSingleFile'>cupsSingleFile</a></h3>
<p class='summary'>*cupsSingleFile: Boolean</p>
@@ -1534,6 +1583,7 @@ before the filter that accepts the given MIME type.</p>
*cupsSingleFile: True
</pre>
+
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsSNMPSupplies'>cupsSNMPSupplies</a></h3>
<p class='summary'>*cupsSNMPSupplies: boolean</p>
@@ -1549,6 +1599,7 @@ the standard SNMP Printer MIB OIDs for supply levels. The default value is
*cupsSNMPSupplies: False
</pre>
+
<h3><a name='cupsVersion'>cupsVersion</a></h3>
<p class='summary'>*cupsVersion: major.minor</p>
@@ -1607,6 +1658,7 @@ in order to be usable with all applications.</p>
*APDialogExtension: "/Library/Printers/vendor/options.plugin"
</pre>
+
<h3><span class='info'>macOS 10.4</span><a name='APDuplexRequiresFlippedMargin'>APDuplexRequiresFlippedMargin</a></h3>
<p class='summary'>*APDuplexRequiresFlippedMargin: boolean</p>
@@ -1689,6 +1741,7 @@ and the <tt>Tumble</tt> page attribute.</p>
<p>Also see the related <a href='#cupsBackSide'><tt>cupsBackSide</tt></a>
keyword.</p>
+
<h3><a name='APHelpBook'>APHelpBook</a></h3>
<p class='summary'>*APHelpBook: "bundle URL"</p>
@@ -1704,6 +1757,7 @@ looking up IPP reason codes for this printer driver. The
*APHelpBook: "file:///Library/Printers/vendor/Help.bundle"
</pre>
+
<h3><span class='info'>macOS 10.6</span><a name='APICADriver'>APICADriver</a></h3>
<p class='summary'>*APICADriver: boolean</p>
@@ -1718,6 +1772,7 @@ Architecture (ICA) driver for scanning. The default is <tt>False</tt>.</p>
*APScanAppBundleID: "com.apple.ImageCaptureApp"
</pre>
+
<h3><span class='info'>macOS 10.3</span><a name='APPrinterIconPath'>APPrinterIconPath</a></h3>
<p class='summary'>*APPrinterIconPath: "/Library/Printers/vendor/filename.icns"</p>
@@ -1732,6 +1787,7 @@ displaying the printer. The file must be in the Apple icon format.</p>
*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.icns"
</pre>
+
<h3><span class='info'>macOS 10.4</span><a name='APPrinterLowInkTool'>APPrinterLowInkTool</a></h3>
<p class='summary'>*APPrinterLowInkTool: "/Library/Printers/vendor/program"</p>
@@ -1749,6 +1805,7 @@ Technical Note TN2144</a> for more information.</p>
*APPrinterLowInkTool: "/Library/Printers/vendor/Tools/lowinktool"
</pre>
+
<h3><span class='info'>macOS 10.5</span><a name='APPrinterPreset'>APPrinterPreset</a></h3>
<p class='summary'>*APPrinterPreset name/text: "*Option Choice ..."</p>
@@ -1819,6 +1876,7 @@ choice (*MainKeyword OptionKeyword) or a preset identifier and value
*fr.APPrinterPreset Photo_on_Photo_Paper/Photo sur papier photographique: ""
</pre>
+
<h3><span class='info'>macOS 10.3</span><a name='APPrinterUtilityPath'>APPrinterUtilityPath</a></h3>
<p class='summary'>*APPrinterPrinterUtilityPath: "/Library/Printers/vendor/filename.app"</p>
@@ -1834,6 +1892,7 @@ information.</p>
*APPrinterPrinterUtilityPath: "/Library/Printers/vendor/Tools/utility.app"
</pre>
+
<h3><span class='info'>macOS 10.6</span><a name='APScannerOnly'>APScannerOnly</a></h3>
<p class='summary'>*APScannerOnly: boolean</p>
@@ -1848,6 +1907,7 @@ capabilities. The default is <tt>False</tt>.</p>
*APScannerOnly: True
</pre>
+
<h3><span class='info'>macOS 10.3</span><a name='APScanAppBundleID'>APScanAppBundleID</a></h3>
<p class='summary'>*APScanAppBundleID: "bundle ID"</p>
@@ -1865,6 +1925,15 @@ the device.</p>
<h2 class='title'><a name='HISTORY'>Change History</a></h2>
+<h3>Changes in CUPS 2.3</h3>
+
+<ul>
+
+ <li>Added <a href="#cupsFinishingTemplate"><tt>cupsFinishingTemplate</tt></a> option.</li>
+
+</ul>
+
+
<h3>Changes in CUPS 1.7</h3>
<ul>
@@ -1981,6 +2050,7 @@ the device.</p>
</ul>
+
<h3>Changes in CUPS 1.2.8</h3>
<ul>
@@ -1990,6 +2060,7 @@ the device.</p>
</ul>
+
<h3>Changes in CUPS 1.2</h3>
<ul>
@@ -2015,6 +2086,7 @@ the device.</p>
</ul>
+
<h3>Changes in CUPS 1.1</h3>
<ul>
diff --git a/scheduler/printers.c b/scheduler/printers.c
index 662c58c98..557d7514f 100644
--- a/scheduler/printers.c
+++ b/scheduler/printers.c
@@ -4098,17 +4098,10 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
input_slot = ppdFindMarkedChoice(ppd, "InputSlot");
media_type = ppdFindMarkedChoice(ppd, "MediaType");
col = new_media_col(pwgsize,
- input_slot ?
- _ppdCacheGetSource(p->pc,
- input_slot->choice) :
- NULL,
- media_type ?
- _ppdCacheGetType(p->pc,
- media_type->choice) :
- NULL);
-
- ippAddCollection(p->ppd_attrs, IPP_TAG_PRINTER, "media-col-default",
- col);
+ input_slot ? _ppdCacheGetSource(p->pc, input_slot->choice) : NULL,
+ media_type ? _ppdCacheGetType(p->pc, media_type->choice) : NULL);
+
+ ippAddCollection(p->ppd_attrs, IPP_TAG_PRINTER, "media-col-default", col);
ippDelete(col);
}
@@ -4698,6 +4691,22 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
}
}
+ if (p->pc && p->pc->templates)
+ {
+ const char *template; /* Finishing template */
+ ipp_attribute_t *fin_col_db; /* finishings-col-database attribute */
+ ipp_t *fin_col; /* finishings-col value */
+
+ fin_col_db = ippAddCollections(p->ppd_attrs, IPP_TAG_PRINTER, "finishings-col-database", cupsArrayCount(p->pc->templates), NULL);
+ for (i = 0, template = (const char *)cupsArrayFirst(p->pc->templates); template; i ++, template = (const char *)cupsArrayNext(p->pc->templates))
+ {
+ fin_col = ippNew();
+ ippAddString(fin_col, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "finishing-template", NULL, template);
+ ippSetCollection(p->ppd_attrs, &fin_col_db, i, fin_col);
+ ippDelete(fin_col);
+ }
+ }
+
for (i = 0; i < ppd->num_sizes; i ++)
if (ppd->sizes[i].length > 1728)
p->type |= CUPS_PRINTER_LARGE;
diff --git a/xcode/CUPS.xcodeproj/project.pbxproj b/xcode/CUPS.xcodeproj/project.pbxproj
index b057da2c9..b4729ddb6 100644
--- a/xcode/CUPS.xcodeproj/project.pbxproj
+++ b/xcode/CUPS.xcodeproj/project.pbxproj
@@ -7211,7 +7211,7 @@
72BF96371333042100B1EAD7 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0920;
+ LastUpgradeCheck = 0910;
ORGANIZATIONNAME = "Apple Inc.";
TargetAttributes = {
270695FD1CADF3E200FFE5FB = {