1<!DOCTYPE html>
2<html>
3<!-- SECTION: Specifications -->
4  <head>
5    <title>CUPS PPD Extensions</title>
6    <meta name="keywords" content="Specifications">
7    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
8    <meta name="creator" content="codedoc v3.1">
9    <meta name="author" content="Unknown">
10    <meta name="copyright" content="Unknown">
11    <meta name="version" content="0.0">
12    <style type="text/css"><!--
13BODY {
14  font-family: lucida grande, geneva, helvetica, arial, sans-serif;
15}
16
17H1, H2, H3, H4, H5, H6, P, TD, TH {
18  font-family: lucida grande, geneva, helvetica, arial, sans-serif;
19}
20
21H1 { font-size: 2em; }
22H2 { font-size: 1.75em; }
23H3 { font-size: 1.5em; }
24H4 { font-size: 1.25em; }
25
26KBD {
27  font-family: monaco, courier, monospace;
28  font-weight: bold;
29}
30
31PRE {
32  font-family: monaco, courier, monospace;
33}
34
35BLOCKQUOTE {
36  border-left: solid 2px #777;
37  margin: 1em 0;
38  padding: 10px;
39}
40
41BLOCKQUOTE OL LI {
42  margin-left: -1em;
43}
44
45PRE.command, PRE.example {
46  background: #eee;
47  margin: 0 36pt;
48  padding: 10px;
49}
50
51P.compact {
52  margin: 0;
53}
54
55P.example {
56  font-style: italic;
57  margin-left: 36pt;
58}
59
60DL.man DD {
61  margin-left: 5em;
62}
63
64DL.man DT {
65  margin-left: 0;
66}
67
68PRE.man {
69  margin: 0;
70}
71
72PRE.command EM, PRE.example EM {
73  font-family: lucida grande, geneva, helvetica, arial, sans-serif;
74}
75
76P.command {
77  font-family: monaco, courier, monospace;
78  margin-left: 36pt;
79}
80
81P.formula {
82  font-style: italic;
83  margin-left: 36pt;
84}
85
86A IMG {
87  border: none;
88}
89
90A:link:hover IMG {
91  background: #f0f0f0;
92  border-radius: 10px;
93  -moz-border-radius: 10px;
94}
95
96A:link, A:visited {
97  font-weight: inherit;
98  text-decoration: none;
99}
100
101A:link:hover, A:visited:hover, A:active {
102  text-decoration: underline;
103}
104
105SUB, SUP {
106  font-size: 50%;
107}
108
109TR.data, TD.data, TR.data TD {
110  margin-top: 10pt;
111  padding: 5pt;
112  border-bottom: solid 1pt #999999;
113}
114
115TR.data TH {
116  border-bottom: solid 1pt #999999;
117  padding-top: 10pt;
118  padding-left: 5pt;
119  text-align: left;
120}
121
122DIV.table TABLE {
123  border: solid thin #999999;
124  border-collapse: collapse;
125  border-spacing: 0;
126  margin-left: auto;
127  margin-right: auto;
128}
129
130DIV.table CAPTION {
131  caption-side: top;
132  font-size: 120%;
133  font-style: italic;
134  font-weight: bold;
135  margin-left: auto;
136  margin-right: auto;
137}
138
139DIV.table TABLE TD {
140  border: solid thin #cccccc;
141  padding: 5pt 10pt 0;
142}
143
144DIV.table TABLE TH {
145  background: #cccccc;
146  border: none;
147  border-bottom: solid thin #999999;
148}
149
150DIV.figure TABLE {
151  margin-left: auto;
152  margin-right: auto;
153}
154
155DIV.figure CAPTION {
156  caption-side: bottom;
157  font-size: 120%;
158  font-style: italic;
159  font-weight: bold;
160  margin-left: auto;
161  margin-right: auto;
162}
163
164TH.label {
165  text-align: right;
166  vertical-align: top;
167}
168
169TH.sublabel {
170  text-align: right;
171  font-weight: normal;
172}
173
174HR {
175  border: solid thin;
176}
177
178SPAN.info {
179  background: black;
180  border: thin solid black;
181  color: white;
182  font-size: 80%;
183  font-style: italic;
184  font-weight: bold;
185  white-space: nowrap;
186}
187
188H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
189  float: right;
190  font-size: 100%;
191}
192
193H1.title {
194}
195
196H2.title, H3.title {
197  border-bottom: solid 2pt #000000;
198}
199
200DIV.indent, TABLE.indent {
201  margin-top: 2em;
202  margin-left: auto;
203  margin-right: auto;
204  width: 90%;
205}
206
207TABLE.indent {
208  border-collapse: collapse;
209}
210
211TABLE.indent TD, TABLE.indent TH {
212  padding: 0;
213}
214
215TABLE.list {
216  border-collapse: collapse;
217  margin-left: auto;
218  margin-right: auto;
219  width: 90%;
220}
221
222TABLE.list TH {
223  background: white;
224  border-bottom: solid thin #cccccc;
225  color: #444444;
226  padding-top: 10pt;
227  padding-left: 5pt;
228  text-align: left;
229  vertical-align: bottom;
230  white-space: nowrap;
231}
232
233TABLE.list TH A {
234  color: #4444cc;
235}
236
237TABLE.list TD {
238  border-bottom: solid thin #eeeeee;
239  padding-top: 5pt;
240  padding-left: 5pt;
241}
242
243TABLE.list TR:nth-child(even) {
244  background: #f8f8f8;
245}
246
247TABLE.list TR:nth-child(odd) {
248  background: #f4f4f4;
249}
250
251DT {
252  margin-left: 36pt;
253  margin-top: 12pt;
254}
255
256DD {
257  margin-left: 54pt;
258}
259
260DL.category DT {
261  font-weight: bold;
262}
263
264P.summary {
265  margin-left: 36pt;
266  font-family: monaco, courier, monospace;
267}
268
269DIV.summary TABLE {
270  border: solid thin #999999;
271  border-collapse: collapse;
272  border-spacing: 0;
273  margin: 10px;
274}
275
276DIV.summary TABLE TD, DIV.summary TABLE TH {
277  border: solid thin #999999;
278  padding: 5px;
279  text-align: left;
280  vertical-align: top;
281}
282
283DIV.summary TABLE THEAD TH {
284  background: #eeeeee;
285}
286
287/* API documentation styles... */
288div.body h1 {
289  font-size: 250%;
290  font-weight: bold;
291  margin: 0;
292}
293div.body h2 {
294  font-size: 250%;
295  margin-top: 1.5em;
296}
297div.body h3 {
298  font-size: 150%;
299  margin-bottom: 0.5em;
300  margin-top: 1.5em;
301}
302div.body h4 {
303  font-size: 110%;
304  margin-bottom: 0.5em;
305  margin-top: 1.5em;
306}
307div.body h5 {
308  font-size: 100%;
309  margin-bottom: 0.5em;
310  margin-top: 1.5em;
311}
312div.contents {
313  background: #e8e8e8;
314  border: solid thin black;
315  padding: 10px;
316}
317div.contents h1 {
318  font-size: 110%;
319}
320div.contents h2 {
321  font-size: 100%;
322}
323div.contents ul.contents {
324  font-size: 80%;
325}
326.class {
327  border-bottom: solid 2px gray;
328}
329.constants {
330}
331.description {
332  margin-top: 0.5em;
333}
334.discussion {
335}
336.enumeration {
337  border-bottom: solid 2px gray;
338}
339.function {
340  border-bottom: solid 2px gray;
341  margin-bottom: 0;
342}
343.members {
344}
345.method {
346}
347.parameters {
348}
349.returnvalue {
350}
351.struct {
352  border-bottom: solid 2px gray;
353}
354.typedef {
355  border-bottom: solid 2px gray;
356}
357.union {
358  border-bottom: solid 2px gray;
359}
360.variable {
361}
362h1, h2, h3, h4, h5, h6 {
363  page-break-inside: avoid;
364}
365blockquote {
366  border: solid thin gray;
367  box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
368  padding: 10px 10px 0px;
369  page-break-inside: avoid;
370}
371p code, li code, p.code, pre, ul.code li {
372  background: rgba(127,127,127,0.1);
373  border: thin dotted gray;
374  font-family: monospace;
375  hyphens: manual;
376  -webkit-hyphens: manual;
377  page-break-inside: avoid;
378}
379p.code, pre, ul.code li {
380  padding: 10px;
381}
382p code, li code {
383  padding: 2px 5px;
384}
385a:link, a:visited {
386  text-decoration: none;
387}
388span.info {
389  background: black;
390  border: solid thin black;
391  color: white;
392  font-size: 80%;
393  font-style: italic;
394  font-weight: bold;
395  white-space: nowrap;
396}
397h2 span.info, h3 span.info, h4 span.info {
398  border-radius: 10px;
399  float: right;
400  font-size: 80%;
401  padding: 3px 6px;
402}
403h2.title span.info, h3.title span.info, h4.title span.info {
404  border-bottom-left-radius: 0px;
405  border-bottom-right-radius: 0px;
406}
407h2.title span.info {
408  padding: 4px 6px;
409}
410ul.code, ul.contents, ul.subcontents {
411  list-style-type: none;
412  margin: 0;
413  padding-left: 0;
414}
415ul.code li {
416  margin: 0;
417}
418ul.contents > li {
419  margin-top: 1em;
420}
421ul.contents li ul.code, ul.contents li ul.subcontents {
422  padding-left: 2em;
423}
424table.list {
425  border-collapse: collapse;
426  width: 100%;
427}
428table.list tr:nth-child(even) {
429  background: rgba(127,127,127,0.1);]n}
430table.list th {
431  border-right: 2px solid gray;
432  font-family: monospace;
433  padding: 5px 10px 5px 2px;
434  text-align: right;
435  vertical-align: top;
436}
437table.list td {
438  padding: 5px 2px 5px 10px;
439  text-align: left;
440  vertical-align: top;
441}
442h1.title {
443}
444h2.title {
445  border-bottom: solid 2px black;
446}
447h3.title {
448  border-bottom: solid 2px black;
449}
450--></style>
451  </head>
452  <body>
453<!--
454  PPD extension documentation for CUPS.
455
456  Copyright © 2007-2011 by Apple Inc.
457  Copyright © 1997-2007 by Easy Software Products.
458
459  Licensed under Apache License v2.0.  See the file "LICENSE" for more
460  information.
461-->
462
463<H1 CLASS="title">CUPS PPD Extensions</H1>
464
465<p>This specification describes the attributes and extensions that CUPS adds to <a href="http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf" target="_blank">Adobe TechNote #5003: PostScript Printer Description File Format Specification Version 4.3</a>. PostScript Printer Description ("PPD") files describe the capabilities of each printer and are used by CUPS to support printer-specific features and intelligent filtering.</p>
466
467<div class='summary'><table summary='General Information'>
468<tbody>
469<tr>
470	<th>See Also</th>
471	<td>Programming: <a href='postscript-driver.html'>Developing PostScript Printer Drivers</a><br>
472	Programming: <a href='raster-driver.html'>Developing Raster Printer Drivers</a><br>
473	Programming: <a href='api-filter.html'>Filter and Backend Programming</a><br>
474	Programming: <a href='ppd-compiler.html'>Introduction to the PPD Compiler</a><br>
475	Programming: <a href='api-raster.html'>Raster API</a><br>
476	References: <a href='ref-ppdcfile.html'>PPD Compiler Driver Information File Reference</a></td>
477</tr>
478</tbody>
479</table></div>
480    <div class="contents">
481      <h2 class="title">Contents</h2>
482      <ul class="contents">
483        <li><a href="#SYNTAX">PPD File Syntax</a></li>
484        <li><a href="#AUTOCONFIG">Auto-Configuration</a><ul class="subcontents">
485          <li><a href="#APAutoSetupTool">APAutoSetupTool</a></li>
486          <li><a href="#QUERYKEYWORD">?MainKeyword</a></li>
487          <li><a href="#OID">OIDMainKeyword</a></li>
488        </ul></li>
489        <li><a href="#PROFILES">Color Profiles</a><ul class="subcontents">
490          <li><a href="#cupsColorProfile">cupsColorProfile</a></li>
491          <li><a href="#cupsICCProfile">cupsICCProfile</a></li>
492          <li><a href="#APCustom">Custom Color Matching Support</a></li>
493        </ul></li>
494        <li><a href="#CONSTRAINTS">Constraints</a><ul class="subcontents">
495          <li><a href="#cupsUIConstraints">cupsUIConstraints</a></li>
496          <li><a href="#cupsUIResolver">cupsUIResolver</a></li>
497        </ul></li>
498        <li><a href="#I18N">Globalized PPD Support</a></li>
499        <li><a href="#OPTIONS">&lt;span class=&quot;info&quot;&gt;CUPS 1.3/macOS 10.6&lt;/span&gt;Custom Options</a></li>
500        <li><a href="#RASTERPS">Writing PostScript Option Commands for Raster Drivers</a></li>
501        <li><a href="#MEDIA">Media Keywords</a><ul class="subcontents">
502          <li><a href="#cupsMediaQualifier2">cupsMediaQualifier2</a></li>
503          <li><a href="#cupsMediaQualifier3">cupsMediaQualifier3</a></li>
504          <li><a href="#cupsMinSize">cupsMinSize</a></li>
505          <li><a href="#cupsMaxSize">cupsMaxSize</a></li>
506          <li><a href="#cupsPageSizeCategory">cupsPageSizeCategory</a></li>
507        </ul></li>
508        <li><a href="#ATTRIBUTES">General Attributes</a><ul class="subcontents">
509          <li><a href="#cupsBackSide">cupsBackSide</a></li>
510          <li><a href="#cupsCommands">cupsCommands</a></li>
511          <li><a href="#cupsEvenDuplex">cupsEvenDuplex</a></li>
512          <li><a href="#cupsFax">cupsFax</a></li>
513          <li><a href="#cupsFilter">cupsFilter</a></li>
514          <li><a href="#cupsFilter2">cupsFilter2</a></li>
515          <li><a href="#cupsFinishingTemplate">cupsFinishingTemplate</a></li>
516          <li><a href="#cupsFlipDuplex">cupsFlipDuplex</a></li>
517          <li><a href="#cupsIPPFinishings">cupsIPPFinishings</a></li>
518          <li><a href="#cupsIPPReason">cupsIPPReason</a></li>
519          <li><a href="#cupsIPPSupplies">cupsIPPSupplies</a></li>
520          <li><a href="#cupsJobAccountId">cupsJobAccountId</a></li>
521          <li><a href="#cupsJobAccountingUserId">cupsJobAccountingUserId</a></li>
522          <li><a href="#cupsJobPassword">cupsJobPassword</a></li>
523          <li><a href="#cupsLanguages">cupsLanguages</a></li>
524          <li><a href="#cupsMandatory">cupsMandatory</a></li>
525          <li><a href="#cupsManualCopies">cupsManualCopies</a></li>
526          <li><a href="#cupsMarkerName">cupsMarkerName</a></li>
527          <li><a href="#cupsMarkerNotice">cupsMarkerNotice</a></li>
528          <li><a href="#cupsMaxCopies">cupsMaxCopies</a></li>
529          <li><a href="#cupsModelNumber">cupsModelNumber</a></li>
530          <li><a href="#cupsPJLCharset">cupsPJLCharset</a></li>
531          <li><a href="#cupsPJLDisplay">cupsPJLDisplay</a></li>
532          <li><a href="#cupsPortMonitor">cupsPortMonitor</a></li>
533          <li><a href="#cupsPreFilter">cupsPreFilter</a></li>
534          <li><a href="#cupsPrintQuality">cupsPrintQuality</a></li>
535          <li><a href="#cupsSingleFile">cupsSingleFile</a></li>
536          <li><a href="#cupsSNMPSupplies">cupsSNMPSupplies</a></li>
537          <li><a href="#cupsVersion">cupsVersion</a></li>
538          <li><a href="#JCLToPDFInterpreter">JCLToPDFInterpreter</a></li>
539        </ul></li>
540        <li><a href="#MACOSX">macOS Attributes</a><ul class="subcontents">
541          <li><a href="#APDialogExtension">APDialogExtension</a></li>
542          <li><a href="#APDuplexRequiresFlippedMargin">APDuplexRequiresFlippedMargin</a></li>
543          <li><a href="#APHelpBook">APHelpBook</a></li>
544          <li><a href="#APICADriver">APICADriver</a></li>
545          <li><a href="#APPrinterIconPath">APPrinterIconPath</a></li>
546          <li><a href="#APPrinterLowInkTool">APPrinterLowInkTool</a></li>
547          <li><a href="#APPrinterPreset">APPrinterPreset</a></li>
548          <li><a href="#APPrinterUtilityPath">APPrinterUtilityPath</a></li>
549          <li><a href="#APScannerOnly">APScannerOnly</a></li>
550          <li><a href="#APScanAppBundleID">APScanAppBundleID</a></li>
551        </ul></li>
552        <li><a href="#HISTORY">Change History</a></li>
553      </ul>
554    </div>
555    <div class="body">
556<h2 class='title'><a name='SYNTAX'>PPD File Syntax</a></h2>
557
558<p>The PPD format is text-based and uses lines of up to 255 characters terminated by a carriage return, linefeed, or combination of carriage return and line feed. The following ABNF definition [<a href="http://tools.ietf.org/html/rfc5234" target="_blank">RFC5234</a>] defines the general format of lines in a PPD file:</p>
559
560<pre class='command'>
561PPD-FILE = HEADER +(DATA / COMMENT / LINE-END)
562
563HEADER   = "*PPD-Adobe:" *WSP DQUOTE VERSION DQUOTE LINE-END
564
565VERSION  = "4.0" / "4.1" / "4.2" / "4.3"
566
567COMMENT  = "*%" *TCHAR LINE-END
568
569DATA     = "*" 1*KCHAR [ WSP 1*KCHAR [ "/" 1*TCHAR ] ] ":"
570           1*(*WSP VALUE) LINE-END
571
572VALUE    = 1*TCHAR / DQUOTE 1*SCHAR DQUOTE
573
574KCHAR    = ALPHA / DIGIT / "_" / "." / "-"
575
576SCHAR    = LINE-END / WSP / %x21.23-7E.A0-FF
577
578TCHAR    = %x20-7E.A0-FF
579
580LINE-END = CR / LF / CR LF
581</pre>
582
583
584<h2 class='title'><a name='AUTOCONFIG'>Auto-Configuration</a></h2>
585
586<p>CUPS supports several methods of auto-configuration via PPD keywords.</p>
587
588
589<h3 class="title"><span class='info'>macOS 10.5</span><a name='APAutoSetupTool'>APAutoSetupTool</a></h3>
590
591<p class='summary'>*APAutoSetupTool: "/LibraryPrinters/vendor/filename"</p>
592
593<p>This macOS keyword defines a program that sets the default option choices. It is run when a printer is added from the <var>Add Printer</var> window or the <var>Nearby Printers</var> list in the <var>Print</var> dialog.</p>
594
595<p>The program is provided with two arguments: the printer's device URI and the PPD file to be used for the printer. The program must write an updated PPD file to stdout.</p>
596
597<p>Examples:</p>
598
599<pre class='command'>
600*% Use our setup tool when adding a printer
601*APAutoSetupTool: "/Library/Printers/vendor/Tools/autosetuptool"
602</pre>
603
604
605<h3 class="title"><span class='info'>macOS 10.2/CUPS 1.4</span><a name='QUERYKEYWORD'>?MainKeyword</a></h3>
606
607<p class='summary'>*?<i>MainKeyword</i>: "<br>
608  PostScript query code that writes a message using the = operator...<br>
609"<br>
610*End</p>
611
612<p>The <tt>?<i>MainKeyword</i></tt> keyword defines PostScript code that determines the currently selected/enabled option keyword (choice) for the main keyword (option). It is typically used when communicating with USB, serial, Appletalk, and AppSocket (port 9100) printers.</p>
613
614<p>The PostScript code typically sends its response back using the <tt>=</tt> operator.</p>
615
616<p>Example:</p>
617
618<pre class='command'>
619*OpenUI OptionDuplex/Duplexer Installed: Boolean
620*DuplexOptionDuplex: False
621*OptionDuplex False/Not Installed: ""
622*OptionDuplex True/Installed: ""
623
624<em>*% Query the printer for the presence of the duplexer option...</em>
625*?OptionDuplex: "
626  currentpagedevice /Duplex known
627  {(True)} {(False)} ifelse
628  = flush
629"
630*End
631*CloseUI: OptionDuplex
632</pre>
633
634
635<h3 class="title"><span class='info'>macOS 10.4/CUPS 1.5</span><a name='OID'>OIDMainKeyword</a></h3>
636
637<p class='summary'>*?OID<i>MainKeyword</i>: ".n.n.n..."<br>
638*OID<i>MainKeyword</i> <i>OptionKeyword1</i>: "value"<br>
639...<br>
640*OID<i>MainKeyword</i> <i>OptionKeywordN</i>: "value"</p>
641
642<p>The <tt>OID<i>MainKeyword</i></tt> keyword is used to define SNMP OIDs that map to installable options. The first (query) line defines the OID to lookup on the network device. The second and subsequent keywords define a mapping from OID value to option keyword. Since SNMP is an IP-based network protocol, this method is typically only used to configure AppSocket, IPP, and LPD network printers.</p>
643
644<p>Examples:</p>
645
646<pre class='command'>
647*% Get the installed memory on the printer...
648*?OIDInstalledMemory: ".1.3.6.1.2.1.25.2.2.0"
649*OIDInstalledMemory 16MB: "16384 KBytes"
650*OIDInstalledMemory 32MB: "32768 KBytes"
651*OIDInstalledMemory 48MB: "49152 KBytes"
652*OIDInstalledMemory 72MB: "73728 KBytes"
653</pre>
654
655
656<h2 class='title'><a name='PROFILES'>Color Profiles</a></h2>
657
658<p>CUPS supports three types of color profiles. The first type is based on sRGB and is used by the standard CUPS raster filters and GPL Ghostscript. The second type is based on ICC profiles and is used by the Quartz-based filters on macOS. The final type is based on well-known colorspaces such as sRGB and Adobe RGB.</p>
659
660<blockquote><b>Note:</b>
661
662<p>At this time, none of the CUPS raster filters support ICC profiles. This will be addressed as time and resources permit.</p>
663
664</blockquote>
665
666
667<h3 class="title"><span class='info'>Deprecated</span><a name='cupsColorProfile'>cupsColorProfile</a></h3>
668
669<p class='summary'>*cupsColorProfile Resolution/MediaType: "density gamma m00 m01 m02 m10 m11 m12 m20 m21 m22"</p>
670
671<p>This string keyword specifies an sRGB-based color profile consisting of gamma and density controls and a 3x3 CMY color transform matrix. <em>This keyword is not supported on macOS.</em></p>
672
673<p>The <i>Resolution</i> and <i>MediaType</i> values may be "-" to act as a wildcard. Otherwise they must match one of the <tt>Resolution</tt> or <tt>MediaType</tt> option keywords defined in the PPD file.</p>
674
675<p>The <i>density</i> and <i>gamma</i> values define gamma and
676density adjustment function such that:</p>
677
678<pre class='command'>
679f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
680</pre>
681
682<p>The <i>m00</i> through <i>m22</i> values define a 3x3 transformation matrix for the CMY color values. The density function is applied <i>after</i> the CMY transformation:</p>
683
684<pre class='command'>
685| m00 m01 m02 |
686| m10 m11 m12 |
687| m20 m21 m22 |
688</pre>
689
690<p>Examples:</p>
691
692<pre class='command'>
693<em>*% Specify a profile for printing at 360dpi on all media types</em>
694*cupsColorProfile 360dpi/-: "1.0 1.5 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0"
695
696<em>*% Specify a profile for printing at 720dpi on Glossy media</em>
697*cupsColorProfile 720dpi/Glossy: "1.0 2.5 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0"
698
699<em>*% Specify a default profile for printing at all other resolutions and media types</em>
700*cupsColorProfile -/-: "0.9 2.0 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0"
701</pre>
702
703
704<h3 class="title"><span class='info'>macOS 10.3/CUPS 1.2</span><a name='cupsICCProfile'>cupsICCProfile</a></h3>
705
706<p class='summary'>*cupsICCProfile ColorModel.MediaType.Resolution/Description: "filename"</p>
707
708<p>This keyword specifies an ICC color profile that is used to convert the document colors to the device colorspace. The <tt>ColorModel</tt>, <tt>MediaType</tt>, and <tt>Resolution</tt> option keywords specify a selector for color profiles. If omitted, the color profile will match any option keyword for the corresponding main keyword.</p>
709
710<p>The <tt>Description</tt> specifies human-readable text that is associated with the color profile. The <tt>filename</tt> portion specifies the ICC color profile to use; if the filename is not absolute, it is loaded relative to the <var>/usr/share/cups/profiles</var> directory.</p>
711
712<p>Examples:</p>
713
714<pre class='command'>
715<em>*% Specify a profile for CMYK printing at 360dpi on all media types</em>
716*cupsICCProfile CMYK..360dpi/360dpi CMYK: "/Library/Printers/vendor/Profiles/foo-360-cmyk.icc"
717
718<em>*% Specify a profile for RGB printing at 720dpi on Glossy media</em>
719*cupsColorProfile RGB.Glossy.720dpi/720dpi Glossy: "/Library/Printers/vendor/Profiles/foo-720-glossy-rgb.icc"
720
721<em>*% Specify a default profile for printing at all other resolutions and media types</em>
722*cupsICCProfile ../Default: "/Library/Printers/vendor/Profiles/foo-default.icc"
723</pre>
724
725<h4 class="title">Customizing the Profile Selection Keywords</h4>
726
727<p>The <tt>ColorModel</tt>, <tt>MediaType</tt>, and <tt>Resolution</tt> main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The <tt>cupsICCQualifier1</tt>, <tt>cupsICCQualifier2</tt>, and <tt>cupsICCQualifier3</tt> keywords define the mapping from selector to main keyword:</p>
728
729<pre class='command'>
730*cupsICCQualifier1: MainKeyword1
731*cupsICCQualifier2: MainKeyword2
732*cupsICCQualifier3: MainKeyword3
733</pre>
734
735<p>The default mapping is as follows:</p>
736
737<pre class='command'>
738*cupsICCQualifier1: ColorModel
739*cupsICCQualifier2: MediaType
740*cupsICCQualifier3: Resolution
741</pre>
742
743
744<h3 class="title"><span class='info'>macOS 10.4</span><a name='APCustom'>Custom Color Matching Support</a></h3>
745
746<p class='summary'>*<a href='#APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a>: true<br>
747*<a href='#APCustomColorMatchingName'>APCustomColorMatchingName</a> name/text: ""<br>
748*<a href='#APCustomColorMatchingProfile'>APCustomColorMatchingProfile</a>: profile<br>
749*<a href='#APDefaultCustomColorMatchingProfile'>APDefaultCustomColorMatchingProfile</a>: profile</p>
750
751<p>These keywords tell the macOS raster filters that the printer driver provides its own custom color matching and that generic color profiles should be used when generating 1-, 3-, and 4-component raster data as requested by the driver. The <tt>APCustomColorMatchingProfile</tt> and <tt>APDefaultColorMatchingProfile</tt> keywords specify alternate color profiles (sRGB or AdobeRGB) to use for 3-color (RGB) raster data.</p>
752
753<blockquote><b>Note:</b>
754
755<p>Prior to macOS 10.6, the default RGB color space was Apple's "GenericRGB". The new default in macOS 10.6 and later is "sRGB". For more information, see <a href="http://support.apple.com/kb/HT3712">"macOS v10.6: About gamma 2.2"</a> on Apple's support site.</p>
756
757</blockquote>
758
759<h4 class="title"><span class='info'>macOS 10.5</span><a name='APCustomColorMatchingName'>APCustomColorMatchingName</a></h4>
760
761<p class='summary'>*APCustomColorMatchingName name/text: ""</p>
762
763<p>This keyword defines an alternate name for the color matching provided by a driver in the <var>Color Matching</var> print panel. The default is to use the name "Vendor Matching" or its localized equivalent.</p>
764
765<p>Examples:</p>
766
767<pre class='command'>
768*% Define the names for our color matching...
769*APCustomColorMatchingName name/AcmeColor(tm): ""
770*fr.APCustomColorMatchingName name/La AcmeColor(tm): ""
771</pre>
772
773<h4 class="title"><span class='info'>macOS 10.5</span><a name='APCustomColorMatchingProfile'>APCustomColorMatchingProfile</a></h4>
774
775<p class='summary'>*APCustomColorMatchingProfile: name</p>
776
777<p>This keyword defines a supported RGB color profile that can be used when doing custom color matching. Currently only <tt>sRGB</tt>, <tt>AdobeRGB</tt>, and <tt>GenericRGB</tt> are supported. If not specified, RGB data will use the GenericRGB colorspace.</p>
778
779<blockquote><b>Note:</b>
780
781<p>If you provide multiple <tt>APCustomColorMatchingProfile</tt> keywords, you are responsible for providing the necessary user interface controls to select the profile in a <a href='#APDialogExtension'>print dialog pane</a>. Add the named profile to the print settings using the key <tt>kPMCustomColorMatchingProfileKey</tt>.</p>
782
783</blockquote>
784
785<p>Examples:</p>
786
787<pre class='command'>
788*% Use sRGB for RGB color by default, but support both sRGB and AdobeRGB
789*APSupportsCustomColorMatching: true
790*APDefaultCustomColorMatchingProfile: sRGB
791*APCustomColorMatchingProfile: sRGB
792*APCustomColorMatchingProfile: AdobeRGB
793</pre>
794
795<h4 class="title"><span class='info'>macOS 10.5</span><a name='APDefaultCustomColorMatchingProfile'>APDefaultCustomColorMatchingProfile</a></h4>
796
797<p class='summary'>*APDefaultCustomColorMatchingProfile: name</p>
798
799<p>This keyword defines the default RGB color profile that will be used when doing custom color matching. Currently only <tt>sRGB</tt>, <tt>AdobeRGB</tt>, and <tt>GenericRGB</tt> are supported.</p>
800
801<p>Examples:</p>
802
803<pre class='command'>
804*% Use sRGB for RGB color by default
805*APSupportsCustomColorMatching: true
806*APDefaultCustomColorMatchingProfile: sRGB
807</pre>
808
809<h4 class="title"><span class='info'>macOS 10.4</span><a name='APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a></h4>
810
811<p class='summary'>*APSupportsCustomColorMatching: boolean</p>
812
813<p>This keyword specifies that the driver provides its own custom color matching. When <tt>true</tt>, the default hand-off colorspace will be GenericGray, GenericRGB, or GenericCMYK depending on the number of components the driver requests. The <a href='#APDefaultCustomColorMatchingProfile'><tt>APDefaultCustomColorMatchingProfile</tt></a> keyword can be used to override the default 3-component (RGB) colorspace.</p>
814
815<p>The default for <tt>APSupportsCustomColorMatching</tt> is <tt>false</tt>.</p>
816
817<p>Examples:</p>
818
819<pre class='command'>
820*APSupportsCustomColorMatching: true
821*APDefaultCustomColorMatchingProfile: sRGB
822</pre>
823
824
825<h2 class='title'><a name='CONSTRAINTS'>Constraints</a></h2>
826
827<p>Constraints are option choices that are not allowed by the driver or device, for example printing 2-sided transparencies. All versions of CUPS support constraints defined by the legacy Adobe <tt>UIConstraints</tt> and <tt>NonUIConstraints</tt> keywords which support conflicts between any two option choices, for example:</p>
828
829<pre class='command'>
830*% Do not allow 2-sided printing on transparency media
831*UIConstraints: "*Duplex *MediaType Transparency"
832*UIConstraints: "*MediaType Transparency *Duplex"
833</pre>
834
835<p>While nearly all constraints can be expressed using these keywords, there are valid scenarios requiring constraints between more than two option choices. In addition, resolution of constraints is problematic since users and software have to guess how a particular constraint is best resolved.</p>
836
837<p>CUPS 1.4 and higher define two new keywords for constraints, <tt>cupsUIConstraints</tt> and <tt>cupsUIResolver</tt>. Each <tt>cupsUIConstraints</tt> keyword points to a <tt>cupsUIResolver</tt> keyword which specifies alternate options that resolve the conflict condition. The same <tt>cupsUIResolver</tt> can be used by multiple <tt>cupsUIConstraints</tt>.</p>
838
839<blockquote><b>Note:</b>
840
841<p>When developing PPD files that contain constraints, it is very important to use the <a href="man-cupstestppd.html">cupstestppd(1)</a> program to verify that your constraints are accurate and cannot result in unresolvable option selections.</p>
842
843</blockquote>
844
845
846<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIConstraints'>cupsUIConstraints</a></h3>
847
848<p class='summary'>*cupsUIConstraints resolver: "*Keyword1 *Keyword2 ..."<br>
849*cupsUIConstraints resolver: "*Keyword1 OptionKeyword1 *Keyword2 ..."<br>
850*cupsUIConstraints resolver: "*Keyword1 *Keyword2 OptionKeyword2 ..."<br>
851*cupsUIConstraints resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."<br>
852*cupsUIConstraints: "*InstallableKeyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
853
854<p>Lists two or more options which conflict. The "resolver" string is a (possibly unique) keyword which specifies which options to change when the constraint exists. When no resolver is provided, CUPS first tries the default choice followed by testing each option choice to resolve the conflict.</p>
855
856<p>Examples:</p>
857
858<pre class='command'>
859<em>*% Specify that 2-sided printing cannot happen on transparencies</em>
860*cupsUIConstraints transparency: "*Duplex *MediaType Transparency"
861
862<em>*% Specify that envelope printing cannot happen from the paper trays</em>
863*cupsUIConstraints envelope: "*PageSize Env10 *InputSlot Tray1"
864*cupsUIConstraints envelope: "*PageSize Env10 *InputSlot Tray1"
865*cupsUIConstraints envelope: "*PageSize EnvDL *InputSlot Tray2"
866*cupsUIConstraints envelope: "*PageSize EnvDL *InputSlot Tray2"
867
868<em>*% Specify an installable option constraint for the envelope feeder</em>
869*cupsUIConstraints: "*InputSlot EnvFeeder *InstalledEnvFeeder"
870
871<em>*% Specify that photo printing cannot happen on plain paper or transparencies at 1200dpi</em>
872*cupsUIConstraints photo: "*OutputMode Photo *MediaType Plain *Resolution 1200dpi"
873*cupsUIConstraints photo: "*OutputMode Photo *MediaType Transparency *Resolution 1200dpi"
874</pre>
875
876
877<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIResolver'>cupsUIResolver</a></h3>
878
879<p class='summary'>*cupsUIResolver resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
880
881<p>Specifies two or more options to mark/select to resolve a constraint. The "resolver" string identifies a particular action to take for one or more <a href='#cupsUIConstraints'><tt>cupsUIConstraints</tt></a>. The same action can be used for multiple constraints. The option keyword pairs are treated as an ordered list of option selections to try - only the first N selections will be used, where N is the minimum number of selections required. Because <a href="api-ppd.html#cupsResolveConflicts"><code>cupsResolveConflicts()</code></a> will not change the most recent option selection passed to it, at least two options from the constraints must be listed to avoid situations where conflicts cannot be resolved.</p>
882
883<p>Examples:</p>
884
885<pre class='command'>
886<em>*% Specify the options to change for the 2-sided transparency constraint</em>
887*cupsUIResolver transparency: "*Duplex None *MediaType Plain"
888
889<em>*% Specify the options to change for the envelope printing constraints.  Notice
890*% that we try to change the InputSlot to either the envelope feeder or the
891*% manual feed first, then we change the page size...</em>
892*cupsUIResolver envelope: "*InputSlot EnvFeeder *InputSlot ManualFeed *PageSize Letter"
893
894<em>*% Specify the options to change for the photo printing constraints</em>
895*cupsUIResolver photo: "*OutputMode Best *Resolution 600dpi"
896</pre>
897
898
899<h2 class='title'><a name='I18N'>Globalized PPD Support</a></h2>
900
901<p>CUPS 1.2 and higher adds support for PPD files containing multiple languages by following the following additional rules:</p>
902
903<ol>
904
905	<li>The <tt>LanguageVersion</tt> MUST be <tt>English</tt></li>
906
907	<li>The <tt>LanguageEncoding</tt> MUST be <tt>ISOLatin1</tt></li>
908
909	<li>The <tt>cupsLanguages</tt> keyword MUST be provided and list each of the supported locales in the PPD file</li>
910
911	<li>Main and option keywords MUST NOT exceed 34 (instead of 40) characters to allow room for the locale prefixes in translation keywords</li>
912
913	<li>The main keyword "Translation" MUST NOT be used</li>
914
915	<li>Translation strings included with the main and option keywords MUST NOT contain characters outside the ASCII subset of ISOLatin1 and UTF-8; developers wishing to use characters outside ASCII MUST provide a separate set of English localization keywords for the affected keywords.</li>
916
917	<li>Localizations are specified using a locale prefix of the form "ll" or "ll_CC." where "ll" is the 2-letter ISO language code and "CC" is the 2-letter ISO country code<ul>
918		<li>A generic language translation ("ll") SHOULD be provided with country-specific differences ("ll_CC") provided only as needed</li>
919		<li>For historical reasons, the "zh" and "zh_CN" locales map to Simplified Chinese while the "zh_TW" locale maps to Traditional Chinese</li>
920	</ul></li>
921
922	<li>Locale-specific translation strings MUST be encoded using UTF-8.</li>
923
924	<li>Main keywords MUST be localized using one of the following forms:
925	<p><tt>*ll.Translation MainKeyword/translation text: ""</tt><br />
926	<tt>*ll_CC.Translation MainKeyword/translation text: ""</tt></p></li>
927
928	<li>Option keywords MUST be localized using one of the following forms:
929	<p><tt>*ll.MainKeyword OptionKeyword/translation text: ""</tt><br>
930	<tt>*ll_CC.MainKeyword OptionKeyword/translation text: ""</tt></p></li>
931
932	<li>Localization keywords MAY appear anywhere after the first line of the PPD file</li>
933
934</ol>
935
936<blockquote><b>Note:</b>
937
938<p>We use a <tt>LanguageEncoding</tt> value of <tt>ISOLatin1</tt> and limit the allowed base translation strings to ASCII to avoid character coding issues that would otherwise occur. In addition, requiring the base translation strings to be in English allows for easier fallback translation when no localization is provided in the PPD file for a given locale.</p>
939
940</blockquote>
941
942<p>Examples:</p>
943
944<pre class='command'>
945*LanguageVersion: English
946*LanguageEncoding: ISOLatin1
947*cupsLanguages: "de fr_CA"
948*ModelName: "Foobar Laser 9999"
949
950<em>*% Localize ModelName for French and German</em>
951*fr_CA.Translation ModelName/La Foobar Laser 9999: ""
952*de.Translation ModelName/Foobar LaserDrucken 9999: ""
953
954*cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html"
955<em>*% Localize printer-state-reason for French and German</em>
956*fr_CA.cupsIPPReason com.vendor-error/Une erreur s&egrave;rieuse s'est produite: "/help/com.vendor/error.html"
957*de.cupsIPPReason com.vendor-error/Eine ernste St&ouml;rung trat: "/help/com.vendor/error.html"
958
959...
960
961*OpenUI *InputSlot/Paper Source: PickOne
962*OrderDependency: 10 AnySetup *InputSlot
963*DefaultInputSlot: Auto
964<em>*% Localize InputSlot for French and German</em>
965*fr_CA.Translation InputSlot/Papier source: ""
966*de.Translation InputSlot/Papiereinzug: ""
967*InputSlot Auto/Default: "&lt;&lt;/ManualFeed false&gt;&gt;setpagedevice"
968<em>*% Localize InputSlot=Auto for French and German</em>
969*fr_CA.InputSlot Auto/Par Defaut: ""
970*de.InputSlot Auto/Standard: ""
971*InputSlot Manual/Manual Feed: "&lt;&lt;/ManualFeed true&gt;&gt;setpagedevice"
972<em>*% Localize InputSlot=Manual for French and German</em>
973*fr_CA.InputSlot Manual/Manuel mecanisme de alimentation: ""
974*de.InputSlot Manual/Manueller Einzug: ""
975*CloseUI: *InputSlot
976</pre>
977
978
979<h2 class='title'><a name='OPTIONS'><span class="info">CUPS 1.3/macOS 10.6</span>Custom Options</a></h2>
980
981<p>CUPS supports custom options using an extension of the <tt>CustomPageSize</tt> and <tt>ParamCustomPageSize</tt> syntax:</p>
982
983<pre class='command'>
984*CustomFoo True: "command"
985*ParamCustomFoo Name1/Text 1: order type minimum maximum
986*ParamCustomFoo Name2/Text 2: order type minimum maximum
987...
988*ParamCustomFoo NameN/Text N: order type minimum maximum
989</pre>
990
991<p>When the base option is part of the <tt>JCLSetup</tt> section, the "command" string contains JCL commands with "\order" placeholders for each numbered parameter. The CUPS API handles any necessary value quoting for HP-PJL commands. For example, if the JCL command string is "@PJL SET PASSCODE=\1" and the first
992option value is "1234" then CUPS will output the string "@PJL SET PASSCODE=1234".</p>
993
994<p>For non-<tt>JCLSetup</tt> options, the "order" value is a number from 1 to N and specifies the order of values as they are placed on the stack before the command. For example, if the PostScript command string is "&lt;&lt;/cupsReal1 2 1 roll&gt;&gt;setpagedevice" and the option value is "2.0" then CUPS will output the string "2.0 &lt;&lt;/cupsReal1 2 1 roll&gt;&gt;setpagedevice".</p>
995
996<p>The "type" is one of the following keywords:</p>
997
998<ul>
999
1000	<li><tt>curve</tt> - a real value from "minimum" to "maximum" representing a gamma correction curve using the function: f(x) = x <sup>value</sup></li>
1001
1002	<li><tt>int</tt> - an integer value from "minimum" to "maximum"</li>
1003
1004	<li><tt>invcurve</tt> - a real value from "minimum" to "maximum" representing a gamma correction curve using the function: f(x) = x <sup>1 / value</sup></li>
1005
1006	<li><tt>passcode</tt> - a string of numbers value with a minimum of "minimum" numbers and a maximum of "maximum" numbers ("minimum" and "maximum" are numbers and passcode strings are not displayed in the user interface)</li>
1007
1008	<li><tt>password</tt> - a string value with a minimum of "minimum" characters and a maximum of "maximum" characters ("minimum" and "maximum" are numbers and password strings are not displayed in the user interface)</li>
1009
1010	<li><tt>points</tt> - a measurement value in points from "minimum" to "maximum"</li>
1011
1012	<li><tt>real</tt> - a real value from "minimum" to "maximum"</li>
1013
1014	<li><tt>string</tt> - a string value with a minimum of "minimum" characters and a maximum of "maximum" characters ("minimum" and "maximum" are numbers)</li>
1015
1016</ul>
1017
1018<p>Examples:</p>
1019
1020<pre class='command'>
1021<em>*% Base JCL key code option</em>
1022*JCLOpenUI JCLPasscode/Key Code: PickOne
1023*OrderDependency: 10 JCLSetup *JCLPasscode
1024*DefaultJCLPasscode: None
1025*JCLPasscode None/No Code: ""
1026*JCLPasscode 1111: "@PJL SET PASSCODE = 1111&lt;0A&gt;"
1027*JCLPasscode 2222: "@PJL SET PASSCODE = 2222&lt;0A&gt;"
1028*JCLPasscode 3333: "@PJL SET PASSCODE = 3333&lt;0A&gt;"
1029*JCLCloseUI: *JCLPasscode
1030
1031<em>*% Custom JCL key code option</em>
1032*CustomJCLPasscode True: "@PJL SET PASSCODE = \1&lt;0A&gt;"
1033*ParamCustomJCLPasscode Code/Key Code: 1 passcode 4 4
1034
1035
1036<em>*% Base PostScript watermark option</em>
1037*OpenUI WatermarkText/Watermark Text: PickOne
1038*OrderDependency: 10 AnySetup *WatermarkText
1039*DefaultWatermarkText: None
1040*WatermarkText None: ""
1041*WatermarkText Draft: "&lt;&lt;/cupsString1(Draft)&gt;&gt;setpagedevice"
1042*CloseUI: *WatermarkText
1043
1044<em>*% Custom PostScript watermark option</em>
1045*CustomWatermarkText True: "&lt;&lt;/cupsString1 3 -1 roll&gt;&gt;setpagedevice"
1046*ParamCustomWatermarkText Text: 1 string 0 32
1047
1048
1049<em>*% Base PostScript gamma/density option</em>
1050*OpenUI GammaDensity/Gamma and Density: PickOne
1051*OrderDependency: 10 AnySetup *GammaDensity
1052*DefaultGammaDensity: Normal
1053*GammaDensity Normal/Normal: "&lt;&lt;/cupsReal1 1.0/cupsReal2 1.0&gt;&gt;setpagedevice"
1054*GammaDensity Light/Lighter: "&lt;&lt;/cupsReal1 0.9/cupsReal2 0.67&gt;&gt;setpagedevice"
1055*GammaDensity Dark/Darker: "&lt;&lt;/cupsReal1 1.1/cupsReal2 1.5&gt;&gt;setpagedevice"
1056*CloseUI: *GammaDensity
1057
1058<em>*% Custom PostScript gamma/density option</em>
1059*CustomGammaDensity True: "&lt;&lt;/cupsReal1 3 -1 roll/cupsReal2 5 -1&gt;&gt;setpagedevice"
1060*ParamCustomGammaDensity Gamma: 1 curve 0.1 10
1061*ParamCustomGammaDensity Density: 2 real 0 2
1062</pre>
1063
1064
1065<h2 class='title'><a name='RASTERPS'>Writing PostScript Option Commands for Raster Drivers</a></h2>
1066
1067<p>PPD files are used for both PostScript and non-PostScript printers. For CUPS raster drivers, you use a subset of the PostScript language to set page device keywords such as page size, resolution, and so forth. For example, the following code sets the page size to A4 size:</p>
1068
1069<pre class='command'>
1070*PageSize A4: "&lt;&lt;/PageSize[595 842]&gt;&gt;setpagedevice"
1071</pre>
1072
1073<p>Custom options typically use other operators to organize the values into a key/value dictionary for <tt>setpagedevice</tt>. For example, our previous <tt>CustomWatermarkText</tt> option code uses the <tt>roll</tt> operator to move the custom string value into the dictionary for <tt>setpagedevice</tt>:</p>
1074
1075<pre class='command'>
1076*CustomWatermarkText True: "&lt;&lt;/cupsString1 3 -1 roll&gt;&gt;setpagedevice"
1077</pre>
1078
1079<p>For a custom string value of "My Watermark", CUPS will produce the following PostScript code for the option:</p>
1080
1081<pre class='command'>
1082(My Watermark)
1083&lt;&lt;/cupsString1 3 -1 roll&gt;&gt;setpagedevice
1084</pre>
1085
1086<p>The code moves the string value ("My Watermark") from the bottom of the stack to the top, creating a dictionary that looks like:</p>
1087
1088<pre class='command'>
1089&lt;&lt;/cupsString1(My Watermark)&gt;&gt;setpagedevice
1090</pre>
1091
1092<p>The resulting dictionary sets the page device attributes that are sent to your raster driver in the page header.</p>
1093
1094
1095<h3 class="title">Custom Page Size Code</h3>
1096
1097<p>There are many possible implementations of the <tt>CustomPageSize</tt> code. For CUPS raster drivers, the following code is recommended:</p>
1098
1099<pre class='command'>
1100*ParamCustomPageSize Width:        1 points <i>min-width max-width</i>
1101*ParamCustomPageSize Height:       2 points <i>min-height max-height</i>
1102*ParamCustomPageSize WidthOffset:  3 points 0 0
1103*ParamCustomPageSize HeightOffset: 4 points 0 0
1104*ParamCustomPageSize Orientation:  5 int 0 0
1105*CustomPageSize True: "pop pop pop &lt;&lt;/PageSize[5 -2 roll]/ImagingBBox null&gt;&gt;setpagedevice"
1106</pre>
1107
1108
1109<h3 class="title">Supported PostScript Operators</h3>
1110
1111<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>
1112
1113<ul>
1114
1115	<li><tt>&lt;&lt;</tt> - Start a dictionary.</li>
1116
1117	<li><tt>&gt;&gt;</tt> - End a dictionary.</li>
1118
1119	<li><tt>[</tt> - Start an array.</li>
1120
1121	<li><tt>]</tt> - End an array.</li>
1122
1123	<li><tt>copy</tt> - Copy the top N objects on the stack.</li>
1124
1125	<li><tt>dup</tt> - Copy the top object on the stack.</li>
1126
1127	<li><tt>index</tt> - Copy the Nth from the top object on the stack.</li>
1128
1129	<li><tt>pop</tt> - Pop the top object on the stack.</li>
1130
1131	<li><tt>roll</tt> - Shift the top N objects on the stack.</li>
1132
1133	<li><tt>setpagedevice</tt> - Set the page header values according to the key/value dictionary on the stack.</li>
1134
1135</ul>
1136
1137<blockquote><b>Note:</b>
1138
1139<p><em>Never</em> use the unsupported <tt>dict</tt> or <tt>put</tt>
1140operators in your option code. These operators are typically used in
1141option code dating back to Level 1 PostScript printers, which did not
1142support the simpler <tt>&lt;&lt;</tt> or <tt>&gt;&gt;</tt> operators.
1143If you have old option code using <tt>dict</tt> or <tt>put</tt>, you can
1144rewrite it very easily to use the newer <tt>&lt;&lt;</tt> and
1145<tt>&gt;&gt;</tt> operators instead. For example, the following code
1146to set the page size:</p>
1147
1148<style type='text/css'><!--
1149PRE B {
1150  background: #000000;
1151  color: #ffffff;
1152  padding: 2px 5px;
1153}
1154--></style>
1155
1156<pre class='command'>
1157<b>1 dict dup</b> /PageSize [612 792] <b>put</b> setpagedevice
1158</pre>
1159
1160<p>can be rewritten as:</p>
1161
1162<pre class='command'>
1163<b>&lt;&lt;</b> /PageSize [612 792] <b>&gt;&gt;</b> setpagedevice
1164</pre>
1165
1166</blockquote>
1167
1168
1169<h3 class="title">Supported Page Device Attributes</h3>
1170
1171<p>Table 2 shows the supported page device attributes along with PostScript code examples.</p>
1172
1173<div class='table'>
1174<table summary='Supported Page Device Attributes'>
1175<caption>Table 2: <a name='TABLE_2'>Supported Page Device Attributes</a></caption>
1176<thead>
1177<tr>
1178	<th>Name(s)</th>
1179	<th>Type</th>
1180	<th>Description</th>
1181	<th>Example(s)</th>
1182</tr>
1183</thead>
1184<tbody>
1185<tr valign='top'>
1186	<td><tt>AdvanceDistance</tt></td>
1187	<td>Integer</td>
1188	<td>Specifies the number of points to advance roll media after printing.</td>
1189	<td><tt>&lt;&lt;/AdvanceDistance 18&gt;&gt;setpagedevice</tt></td>
1190</tr>
1191<tr valign='top'>
1192	<td><tt>AdvanceMedia</tt></td>
1193	<td>Integer</td>
1194	<td>Specifies when to advance the media: 0 = never, 1 = after the file, 2 = after the job, 3 = after the set, and 4 = after the page.</td>
1195	<td><tt>&lt;&lt;/AdvanceMedia 4&gt;&gt;setpagedevice</tt></td>
1196</tr>
1197<tr valign='top'>
1198	<td><tt>Collate</tt></td>
1199	<td>Boolean</td>
1200	<td>Specifies whether collated copies are required.</td>
1201	<td><tt>&lt;&lt;/Collate true&gt;&gt;setpagedevice</tt></td>
1202</tr>
1203<tr valign='top'>
1204	<td><tt>CutMedia</tt></td>
1205	<td>Integer</td>
1206	<td>Specifies when to cut the media: 0 = never, 1 = after the file, 2 = after the job, 3 = after the set, and 4 = after the page.</td>
1207	<td><tt>&lt;&lt;/CutMedia 1&gt;&gt;setpagedevice</tt></td>
1208</tr>
1209<tr valign='top'>
1210	<td><tt>Duplex</tt></td>
1211	<td>Boolean</td>
1212	<td>Specifies whether 2-sided printing is required.</td>
1213	<td><tt>&lt;&lt;/Duplex true&gt;&gt;setpagedevice</tt></td>
1214</tr>
1215<tr valign='top'>
1216	<td><tt>HWResolution</tt></td>
1217	<td>Integer Array</td>
1218	<td>Specifies the resolution of the page image in pixels per inch.</td>
1219	<td><tt>&lt;&lt;/HWResolution[1200 1200]&gt;&gt;setpagedevice</tt></td>
1220</tr>
1221<tr valign='top'>
1222	<td><tt>InsertSheet</tt></td>
1223	<td>Boolean</td>
1224	<td>Specifies whether to insert a blank sheet before the job.</td>
1225	<td><tt>&lt;&lt;/InsertSheet true&gt;&gt;setpagedevice</tt></td>
1226</tr>
1227<tr valign='top'>
1228	<td><tt>Jog</tt></td>
1229	<td>Integer</td>
1230	<td>Specifies when to shift the media in the output bin: 0 = never, 1 = after the file, 2 = after the job, 3 = after the set, and 4 = after the page.</td>
1231	<td><tt>&lt;&lt;/Jog 2&gt;&gt;setpagedevice</tt></td>
1232</tr>
1233<tr valign='top'>
1234	<td><tt>LeadingEdge</tt></td>
1235	<td>Integer</td>
1236	<td>Specifies the leading edge of the media: 0 = top, 1 = right, 2 = bottom, 3 = left.</td>
1237	<td><tt>&lt;&lt;/LeadingEdge 0&gt;&gt;setpagedevice</tt></td>
1238</tr>
1239<tr valign='top'>
1240	<td><tt>ManualFeed</tt></td>
1241	<td>Boolean</td>
1242	<td>Specifies whether media should be drawn from the manual feed tray. Note: The <tt>MediaPosition</tt> attribute is preferred over the <tt>ManualFeed</tt> attribute.</td>
1243	<td><tt>&lt;&lt;/ManualFeed true&gt;&gt;setpagedevice</tt></td>
1244</tr>
1245<tr valign='top'>
1246	<td><tt>MediaClass</tt></td>
1247	<td>String</td>
1248	<td>Specifies a named media.</td>
1249	<td><tt>&lt;&lt;/MediaClass (Invoices)&gt;&gt;setpagedevice</tt></td>
1250</tr>
1251<tr valign='top'>
1252	<td><tt>MediaColor</tt></td>
1253	<td>String</td>
1254	<td>Specifies the color of the media.</td>
1255	<td><tt>&lt;&lt;/MediaColor &gt;&gt;setpagedevice</tt></td>
1256</tr>
1257<tr valign='top'>
1258	<td><tt>MediaPosition</tt></td>
1259	<td>Integer</td>
1260	<td>Specifies the tray or source of the media.</td>
1261	<td><tt>&lt;&lt;/MediaPosition 12&gt;&gt;setpagedevice</tt></td>
1262</tr>
1263<tr valign='top'>
1264	<td><tt>MediaType</tt></td>
1265	<td>String</td>
1266	<td>Specifies the general media type.</td>
1267	<td><tt>&lt;&lt;/MediaType (Glossy)&gt;&gt;setpagedevice</tt></td>
1268</tr>
1269<tr valign='top'>
1270	<td><tt>MediaWeight</tt></td>
1271	<td>Integer</td>
1272	<td>Specifies the media weight in grams per meter<sup>2</sup>.</td>
1273	<td><tt>&lt;&lt;/MediaWeight 100&gt;&gt;setpagedevice</tt></td>
1274</tr>
1275<tr valign='top'>
1276	<td><tt>MirrorPrint</tt></td>
1277	<td>Boolean</td>
1278	<td>Specifies whether to flip the output image horizontally.</td>
1279	<td><tt>&lt;&lt;/MirrorPrint true&gt;&gt;setpagedevice</tt></td>
1280</tr>
1281<tr valign='top'>
1282	<td><tt>NegativePrint</tt></td>
1283	<td>Boolean</td>
1284	<td>Specifies whether to invert the output image.</td>
1285	<td><tt>&lt;&lt;/NegativePrint true&gt;&gt;setpagedevice</tt></td>
1286</tr>
1287<tr valign='top'>
1288	<td><tt>NumCopies</tt></td>
1289	<td>Integer</td>
1290	<td>Specifies the number of copies to produce of each page.</td>
1291	<td><tt>&lt;&lt;/NumCopies 100&gt;&gt;setpagedevice</tt></td>
1292</tr>
1293<tr valign='top'>
1294	<td><tt>Orientation</tt></td>
1295	<td>Integer</td>
1296	<td>Specifies the orientation of the output: 0 = portrait, 1 = landscape rotated counter-clockwise, 2 = upside-down, 3 = landscape rotated clockwise.</td>
1297	<td><tt>&lt;&lt;/Orientation 3&gt;&gt;setpagedevice</tt></td>
1298</tr>
1299<tr valign='top'>
1300	<td><tt>OutputFaceUp</tt></td>
1301	<td>Boolean</td>
1302	<td>Specifies whether to place the media face-up in the output bin/tray.</td>
1303	<td><tt>&lt;&lt;/OutputFaceUp true&gt;&gt;setpagedevice</tt></td>
1304</tr>
1305<tr valign='top'>
1306	<td><tt>OutputType</tt></td>
1307	<td>String</td>
1308	<td>Specifies the output type name.</td>
1309	<td><tt>&lt;&lt;/OutputType (Photo)&gt;&gt;setpagedevice</tt></td>
1310</tr>
1311<tr valign='top'>
1312	<td><tt>PageSize</tt></td>
1313	<td>Integer/Real Array</td>
1314	<td>Specifies the width and length/height of the page in points.</td>
1315	<td><tt>&lt;&lt;/PageSize[595 842]&gt;&gt;setpagedevice</tt></td>
1316</tr>
1317<tr valign='top'>
1318	<td><tt>Separations</tt></td>
1319	<td>Boolean</td>
1320	<td>Specifies whether to produce color separations.</td>
1321	<td><tt>&lt;&lt;/Separations true&gt;&gt;setpagedevice</tt></td>
1322</tr>
1323<tr valign='top'>
1324	<td><tt>TraySwitch</tt></td>
1325	<td>Boolean</td>
1326	<td>Specifies whether to switch trays automatically.</td>
1327	<td><tt>&lt;&lt;/TraySwitch true&gt;&gt;setpagedevice</tt></td>
1328</tr>
1329<tr valign='top'>
1330	<td><tt>Tumble</tt></td>
1331	<td>Boolean</td>
1332	<td>Specifies whether the back sides of pages are rotated 180 degrees.</td>
1333	<td><tt>&lt;&lt;/Tumble true&gt;&gt;setpagedevice</tt></td>
1334</tr>
1335<tr valign='top'>
1336	<td><tt>cupsBorderlessScalingFactor</tt></td>
1337	<td>Real</td>
1338	<td>Specifies the amount to scale the page image dimensions.</td>
1339	<td><tt>&lt;&lt;/cupsBorderlessScalingFactor 1.01&gt;&gt;setpagedevice</tt></td>
1340</tr>
1341<tr valign='top'>
1342	<td><tt>cupsColorOrder</tt></td>
1343	<td>Integer</td>
1344	<td>Specifies the order of colors: 0 = chunked, 1 = banded, 2 = planar.</td>
1345	<td><tt>&lt;&lt;/cupsColorOrder 0&gt;&gt;setpagedevice</tt></td>
1346</tr>
1347<tr valign='top'>
1348	<td><tt>cupsColorSpace</tt></td>
1349	<td>Integer</td>
1350	<td>Specifies the page image colorspace: 0 = W, 1 = RGB, 2 = RGBA, 3 = K, 4 = CMY, 5 = YMC, 6 = CMYK, 7 = YMCK, 8 = KCMY, 9 = KCMYcm, 10 = GMCK, 11 = GMCS, 12 = White, 13 = Gold, 14 = Silver, 15 = CIE XYZ, 16 = CIE Lab, 17 = RGBW, 32 to 46 = CIE Lab (1 to 15 inks)</td>
1351	<td><tt>&lt;&lt;/cupsColorSpace 1 &gt;&gt;setpagedevice</tt></td>
1352</tr>
1353<tr valign='top'>
1354	<td><tt>cupsCompression</tt></td>
1355	<td>Integer</td>
1356	<td>Specifies a driver compression type/mode.</td>
1357	<td><tt>&lt;&lt;/cupsCompression 2&gt;&gt;setpagedevice</tt></td>
1358</tr>
1359<tr valign='top'>
1360	<td><tt>cupsInteger0<br>
1361	...<br>
1362	cupsInteger15</tt></td>
1363	<td>Integer</td>
1364	<td>Specifies driver integer values.</td>
1365	<td><tt>&lt;&lt;/cupsInteger11 1234&gt;&gt;setpagedevice</tt></td>
1366</tr>
1367<tr valign='top'>
1368	<td><tt>cupsMarkerType</tt></td>
1369	<td>String</td>
1370	<td>Specifies the type of ink/toner to use.</td>
1371	<td><tt>&lt;&lt;/cupsMarkerType (Black+Color)&gt;&gt;setpagedevice</tt></td>
1372</tr>
1373<tr valign='top'>
1374	<td><tt>cupsMediaType</tt></td>
1375	<td>Integer</td>
1376	<td>Specifies a numeric media type.</td>
1377	<td><tt>&lt;&lt;/cupsMediaType 999&gt;&gt;setpagedevice</tt></td>
1378</tr>
1379<tr valign='top'>
1380	<td><tt>cupsPageSizeName</tt></td>
1381	<td>String</td>
1382	<td>Specifies the name of the page size.</td>
1383	<td><tt>&lt;&lt;/cupsPageSizeName (A4.Full)&gt;&gt;setpagedevice</tt></td>
1384</tr>
1385<tr valign='top'>
1386	<td><tt>cupsPreferredBitsPerColor</tt></td>
1387	<td>Integer</td>
1388	<td>Specifies the preferred number of bits per color, typically 8 or 16.</td>
1389	<td><tt>&lt;&lt;/cupsPreferredBitsPerColor 16&gt;&gt;setpagedevice</tt></td>
1390</tr>
1391<tr valign='top'>
1392	<td><tt>cupsReal0<br>
1393	...<br>
1394	cupsReal15</tt></td>
1395	<td>Real</td>
1396	<td>Specifies driver real number values.</td>
1397	<td><tt>&lt;&lt;/cupsReal15 1.234&gt;&gt;setpagedevice</tt></td>
1398</tr>
1399<tr valign='top'>
1400	<td><tt>cupsRenderingIntent</tt></td>
1401	<td>String</td>
1402	<td>Specifies the color rendering intent.</td>
1403	<td><tt>&lt;&lt;/cupsRenderingIntent (AbsoluteColorimetric)&gt;&gt;setpagedevice</tt></td>
1404</tr>
1405<tr valign='top'>
1406	<td><tt>cupsRowCount</tt></td>
1407	<td>Integer</td>
1408	<td>Specifies the number of rows of raster data to print on each line for some drivers.</td>
1409	<td><tt>&lt;&lt;/cupsRowCount 24&gt;&gt;setpagedevice</tt></td>
1410</tr>
1411<tr valign='top'>
1412	<td><tt>cupsRowFeed</tt></td>
1413	<td>Integer</td>
1414	<td>Specifies the number of rows to feed between passes for some drivers.</td>
1415	<td><tt>&lt;&lt;/cupsRowFeed 17&gt;&gt;setpagedevice</tt></td>
1416</tr>
1417<tr valign='top'>
1418	<td><tt>cupsRowStep</tt></td>
1419	<td>Integer</td>
1420	<td>Specifies the number of lines between columns/rows on the print head for some drivers.</td>
1421	<td><tt>&lt;&lt;/cupsRowStep 2&gt;&gt;setpagedevice</tt></td>
1422</tr>
1423<tr valign='top'>
1424	<td><tt>cupsString0<br>
1425	...<br>
1426	cupsString15</tt></td>
1427	<td>String</td>
1428	<td>Specifies driver string values.</td>
1429	<td><tt>&lt;&lt;/cupsString0(String Value)&gt;&gt;setpagedevice</tt></td>
1430</tr>
1431</tbody>
1432</table></div>
1433
1434
1435<h2 class='title'><a name='MEDIA'>Media Keywords</a></h2>
1436
1437<p>The CUPS media keywords allow drivers to specify alternate custom page
1438size limits based on up to two options.</p>
1439
1440
1441<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier2'>cupsMediaQualifier2</a></h3>
1442
1443<p class='summary'>*cupsMediaQualifier2: MainKeyword</p>
1444
1445<p>This keyword specifies the second option to use for overriding the
1446custom page size limits.</p>
1447
1448<p>Example:</p>
1449
1450<pre class='command'>
1451<em>*% Specify alternate custom page size limits based on InputSlot and Quality</em>
1452*cupsMediaQualifier2: InputSlot
1453*cupsMediaQualifier3: Quality
1454*cupsMaxSize .Manual.: "1000 1000"
1455*cupsMinSize .Manual.: "100 100"
1456*cupsMinSize .Manual.Photo: "200 200"
1457*cupsMinSize ..Photo: "300 300"
1458</pre>
1459
1460
1461<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier3'>cupsMediaQualifier3</a></h3>
1462
1463<p class='summary'>*cupsMediaQualifier3: MainKeyword</p>
1464
1465<p>This keyword specifies the third option to use for overriding the
1466custom page size limits.</p>
1467
1468<p>Example:</p>
1469
1470<pre class='command'>
1471<em>*% Specify alternate custom page size limits based on InputSlot and Quality</em>
1472*cupsMediaQualifier2: InputSlot
1473*cupsMediaQualifier3: Quality
1474*cupsMaxSize .Manual.: "1000 1000"
1475*cupsMinSize .Manual.: "100 100"
1476*cupsMinSize .Manual.Photo: "200 200"
1477*cupsMinSize ..Photo: "300 300"
1478</pre>
1479
1480
1481<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMinSize'>cupsMinSize</a></h3>
1482
1483<p class='summary'>*cupsMinSize .Qualifier2.Qualifier3: "width length"<br>
1484*cupsMinSize .Qualifier2.: "width length"<br>
1485*cupsMinSize ..Qualifier3: "width length"</p>
1486
1487<p>This keyword specifies alternate minimum custom page sizes in points.
1488The <a href='#cupsMediaQualifier2'><tt>cupsMediaQualifier2</tt></a> and
1489<a href='#cupsMediaQualifier3'><tt>cupsMediaQualifier3</tt></a> keywords
1490are used to identify options to use for matching.</p>
1491
1492<p>Example:</p>
1493
1494<pre class='command'>
1495<em>*% Specify alternate custom page size limits based on InputSlot and Quality</em>
1496*cupsMediaQualifier2: InputSlot
1497*cupsMediaQualifier3: Quality
1498*cupsMaxSize .Manual.: "1000 1000"
1499*cupsMinSize .Manual.: "100 100"
1500*cupsMinSize .Manual.Photo: "200 200"
1501*cupsMinSize ..Photo: "300 300"
1502</pre>
1503
1504
1505<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMaxSize'>cupsMaxSize</a></h3>
1506
1507<p class='summary'>*cupsMaxSize .Qualifier2.Qualifier3: "width length"<br>
1508*cupsMaxSize .Qualifier2.: "width length"<br>
1509*cupsMaxSize ..Qualifier3: "width length"</p>
1510
1511<p>This keyword specifies alternate maximum custom page sizes in points.
1512The <a href='#cupsMediaQualifier2'><tt>cupsMediaQualifier2</tt></a> and
1513<a href='#cupsMediaQualifier3'><tt>cupsMediaQualifier3</tt></a> keywords
1514are used to identify options to use for matching.</p>
1515
1516<p>Example:</p>
1517
1518<pre class='command'>
1519<em>*% Specify alternate custom page size limits based on InputSlot and Quality</em>
1520*cupsMediaQualifier2: InputSlot
1521*cupsMediaQualifier3: Quality
1522*cupsMaxSize .Manual.: "1000 1000"
1523*cupsMinSize .Manual.: "100 100"
1524*cupsMinSize .Manual.Photo: "200 200"
1525*cupsMinSize ..Photo: "300 300"
1526</pre>
1527
1528
1529<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsPageSizeCategory'>cupsPageSizeCategory</a></h3>
1530
1531<p class="summary">*cupsPageSizeCategory name/text: "name name2 ... nameN"</p>
1532
1533<p>This keyword lists related paper size names that should be grouped together in the Print or Page Setup dialogs. The "name" portion of the keyword specifies the root/default size for the grouping. On macOS the grouped paper sizes are shown in a submenu of the main paper size. When omitted, sizes with the same dimensions are automatically grouped together, for example "Letter" and "Letter.Borderless".</p>
1534
1535<p>Example:</p>
1536
1537<pre class="command">
1538<em>*% Specify grouping of borderless/non-borderless sizes</em>
1539*cupsPageSizeCategory Letter/US Letter: "Letter Letter.Borderless"
1540*cupsPageSizeCategory A4/A4: "A4 A4.Borderless"
1541</pre>
1542
1543
1544<h2 class='title'><a name='ATTRIBUTES'>General Attributes</a></h2>
1545
1546<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsBackSide'>cupsBackSide</a></h3>
1547
1548<p class='summary'>*cupsBackSide: keyword</p>
1549
1550<p>This keyword requests special handling of the back side of pages
1551when doing duplexed (2-sided) output. <a href='#TABLE_1'>Table 1</a>
1552shows the supported keyword values for this keyword and their effect
1553on the raster data sent to your driver. For example, when <tt>cupsBackSide</tt>
1554is <code>Rotated</code> and <tt>Tumble</tt> is <tt>false</tt>, your driver
1555will receive print data starting at the bottom right corner of the page, with
1556each line going right-to-left instead of left-to-right. The default value is
1557<code>Normal</code>.</p>
1558
1559<blockquote><b>Note:</b>
1560
1561<p><tt>cupsBackSide</tt> replaces the older <tt>cupsFlipDuplex</tt>
1562keyword - if <tt>cupsBackSide</tt> is specified, <tt>cupsFlipDuplex</tt>
1563will be ignored.</p>
1564
1565</blockquote>
1566
1567<div class='table'>
1568<table width='80%' summary='Back Side Raster Coordinate System'>
1569<caption>Table 1: <a name='TABLE_1'>Back Side Raster Coordinate System</a></caption>
1570<thead>
1571<tr>
1572	<th>cupsBackSide</th>
1573	<th>Tumble Value</th>
1574	<th>Image Presentation</th>
1575</tr>
1576</thead>
1577<tbody>
1578<tr>
1579	<td><code>Normal</code></td>
1580	<td><code>false</code></td>
1581	<td>Left-to-right, top-to-bottom</td>
1582</tr>
1583<tr>
1584	<td><code>Normal</code></td>
1585	<td><code>true</code></td>
1586	<td>Left-to-right, top-to-bottom</td>
1587</tr>
1588<tr>
1589	<td><code>ManualTumble</code></td>
1590	<td><code>false</code></td>
1591	<td>Left-to-right, top-to-bottom</td>
1592</tr>
1593<tr>
1594	<td><code>ManualTumble</code></td>
1595	<td><code>true</code></td>
1596	<td>Right-to-left, bottom-to-top</td>
1597</tr>
1598<tr>
1599	<td><code>Rotated</code></td>
1600	<td><code>false</code></td>
1601	<td>Right-to-left, bottom-to-top</td>
1602</tr>
1603<tr>
1604	<td><code>Rotated</code></td>
1605	<td><code>true</code></td>
1606	<td>Right-to-left, top-to-bottom</td>
1607</tr>
1608<tr>
1609	<td><code>Flipped</code> *</td>
1610	<td><code>false</code></td>
1611	<td>Left-to-right, bottom-to-top</td>
1612</tr>
1613<tr>
1614	<td><code>Flipped</code> *</td>
1615	<td><code>true</code></td>
1616	<td>Right-to-left, top-to-bottom</td>
1617</tr>
1618</tbody>
1619</table>
1620</div>
1621
1622<p><em>* - Not supported in macOS 10.5.x and earlier</em></p>
1623
1624<div class='figure'><table summary='Back side images'>
1625<caption>Figure 1: Back side images</caption>
1626<tr><td><img src='../images/raster.png' width='624' height='448' alt='Back side images'></td></tr>
1627</table></div>
1628
1629<p>Examples:</p>
1630
1631<pre class='command'>
1632<em>*% Flip the page image for the back side of duplexed output</em>
1633*cupsBackSide: Flipped
1634
1635<em>*% Rotate the page image for the back side of duplexed output</em>
1636*cupsBackSide: Rotated
1637</pre>
1638
1639<p>Also see the related <a href='#APDuplexRequiresFlippedMargin'><tt>APDuplexRequiresFlippedMargin</tt></a>
1640keyword.</p>
1641
1642
1643<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsCommands'>cupsCommands</a></h3>
1644
1645<p class='summary'>*cupsCommands: "name name2 ... nameN"</p>
1646
1647<p>This string keyword specifies the commands that are supported by the
1648CUPS command file filter for this device. The command names are separated
1649by whitespace.</p>
1650
1651<p>Example:</p>
1652
1653<pre class='command'>
1654<em>*% Specify the list of commands we support</em>
1655*cupsCommands: "AutoConfigure Clean PrintSelfTestPage ReportLevels com.vendor.foo"
1656</pre>
1657
1658
1659<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsEvenDuplex'>cupsEvenDuplex</a></h3>
1660
1661<p class='summary'>*cupsEvenDuplex: boolean</p>
1662
1663<p>This boolean keyword notifies the RIP filters that the
1664destination printer requires an even number of pages when 2-sided
1665printing is selected. The default value is <code>false</code>.</p>
1666
1667<p>Example:</p>
1668
1669<pre class='command'>
1670<em>*% Always send an even number of pages when duplexing</em>
1671*cupsEvenDuplex: true
1672</pre>
1673
1674
1675<h3 class="title"><a name='cupsFax'>cupsFax</a></h3>
1676
1677<p class='summary'>*cupsFax: boolean</p>
1678
1679<p>This boolean keyword specifies whether the PPD defines a facsimile device. The default is <tt>false</tt>.</p>
1680
1681<p>Examples:</p>
1682
1683<pre class='command'>
1684*cupsFax: true
1685</pre>
1686
1687
1688<h3 class="title"><a name='cupsFilter'>cupsFilter</a></h3>
1689
1690<p class='summary'>*cupsFilter: "source/type cost program"</p>
1691
1692<p>This string keyword provides a conversion rule from the
1693given source type to the printer's native format using the
1694filter "program". If a printer supports the source type directly,
1695the special filter program "-" may be specified.</p>
1696
1697<p>Examples:</p>
1698
1699<pre class='command'>
1700<em>*% Standard raster printer driver filter</em>
1701*cupsFilter: "application/vnd.cups-raster 100 rastertofoo"
1702
1703<em>*% Plain text filter</em>
1704*cupsFilter: "text/plain 10 texttofoo"
1705
1706<em>*% Pass-through filter for PostScript printers</em>
1707*cupsFilter: "application/vnd.cups-postscript 0 -"
1708</pre>
1709
1710
1711<h3 class="title"><span class='info'>CUPS 1.5</span><a name='cupsFilter2'>cupsFilter2</a></h3>
1712
1713<p class='summary'>*cupsFilter2: "source/type destination/type cost program"</p>
1714
1715<p>This string keyword provides a conversion rule from the given source type to the printer's native format using the filter "program". If a printer supports the source type directly, the special filter program "-" may be specified. The destination type is automatically created as needed and is passed to the filters and backend as the FINAL_CONTENT_TYPE value.</p>
1716
1717<blockquote><b>Note:</b>
1718
1719<p>The presence of a single <code>cupsFilter2</code> keyword in the PPD file will hide any <code>cupsFilter</code> keywords from the CUPS scheduler. When using <code>cupsFilter2</code> to provide filters specific for CUPS 1.5 and later, provide a <code>cupsFilter2</code> line for every filter and a <code>cupsFilter</code> line for each filter that is compatible with older versions of CUPS.</p>
1720
1721</blockquote>
1722
1723<p>Examples:</p>
1724
1725<pre class='command'>
1726<em>*% Standard raster printer driver filter</em>
1727*cupsFilter2: "application/vnd.cups-raster application/vnd.foo 100 rastertofoo"
1728
1729<em>*% Plain text filter</em>
1730*cupsFilter2: "text/plain application/vnd.foo 10 texttofoo"
1731
1732<em>*% Pass-through filter for PostScript printers</em>
1733*cupsFilter2: "application/vnd.cups-postscript application/postscript 0 -"
1734</pre>
1735
1736
1737<h3 class="title"><span class='info'>CUPS 2.3</span><a name='cupsFinishingTemplate'>cupsFinishingTemplate</a></h3>
1738
1739<p class='summary'>*cupsFinishingTemplate name/text: ""</p>
1740
1741<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>
1742
1743<p>Examples:</p>
1744
1745<pre class='command'>
1746*cupsFinishingTemplate none/None: ""
1747*cupsFinishingTemplate fold/Letter Fold: ""
1748*cupsFinishingTemplate punch/2/3-Hole Punch: ""
1749*cupsFinishingTemplate staple/Corner Staple: ""
1750*cupsFinishingTemplate staple-dual/Double Staple: ""
1751*cupsFinishingTemplate staple-and-fold/Corner Staple and Letter Fold: ""
1752*cupsFinishingTemplate staple-and-punch/Corner Staple and 2/3-Hole Punch: ""
1753</pre>
1754
1755
1756<h3 class="title"><span class='info'>Deprecated</span><a name='cupsFlipDuplex'>cupsFlipDuplex</a></h3>
1757
1758<p class='summary'>*cupsFlipDuplex: boolean</p>
1759
1760<p>Due to implementation differences between macOS and Ghostscript,
1761the <tt>cupsFlipDuplex</tt> keyword is deprecated. Instead, use
1762the <a href='#cupsBackSide'><tt>cupsBackSide</tt></a> keyword to specify
1763the coordinate system (pixel layout) of the page data on the back side of
1764duplex pages.</p>
1765
1766<p>The value <code>true</code> maps to a <tt>cupsBackSide</tt> value
1767of <code>Rotated</code> on macOS and <code>Flipped</code> with
1768Ghostscript.</p>
1769
1770<p>The default value is <code>false</code>.</p>
1771
1772<blockquote><b>Note:</b>
1773
1774<p>macOS drivers that previously used
1775<tt>cupsFlipDuplex</tt> may wish to provide both the old and
1776new keywords for maximum compatibility, for example:</p>
1777
1778<pre class='command'>
1779*cupsBackSide: Rotated
1780*cupsFlipDuplex: true
1781</pre>
1782
1783<p>Similarly, drivers written for other operating systems using
1784Ghostscript can use:</p>
1785
1786<pre class='command'>
1787*cupsBackSide: Flipped
1788*cupsFlipDuplex: true
1789</pre></blockquote>
1790
1791
1792<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsIPPFinishings'>cupsIPPFinishings</a></h3>
1793
1794<p class='summary'>*cupsIPPFinishings number/text: "*Option Choice ..."</p>
1795
1796<p>This keyword defines a mapping from IPP <code>finishings</code>
1797values to PPD options and choices.</p>
1798
1799<p>Examples:</p>
1800
1801<pre class='command'>
1802*cupsIPPFinishings 4/staple: "*StapleLocation SinglePortrait"
1803*cupsIPPFinishings 5/punch: "*PunchMedia Yes *PunchLocation LeftSide"
1804*cupsIPPFinishings 20/staple-top-left: "*StapleLocation SinglePortrait"
1805*cupsIPPFinishings 21/staple-bottom-left: "*StapleLocation SingleLandscape"
1806</pre>
1807
1808
1809<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsIPPReason'>cupsIPPReason</a></h3>
1810
1811<p class='summary'>*cupsIPPReason reason/Reason Text: "optional URIs"</p>
1812
1813<p>This optional keyword maps custom
1814<code>printer-state-reasons</code> keywords that are generated by
1815the driver to human readable text. The optional URIs string
1816contains zero or more URIs separated by a newline. Each URI can
1817be a CUPS server absolute path to a help file under the
1818scheduler's <code>DocumentRoot</code> directory, a full HTTP URL
1819("http://www.domain.com/path/to/help/page.html"), or any other
1820valid URI which directs the user at additional information
1821concerning the condition that is being reported.</p>
1822
1823<p>Since the reason text is limited to 80 characters by the PPD specification, longer text strings can be included by URI-encoding the text with the "text" scheme, for example "text:some%20text". Multiple <code>text</code> URIs are combined by the <tt>ppdLocalizeIPPReason</tt> into a single string that can be displayed to the user.</p>
1824
1825<p>Examples:</p>
1826
1827<pre class='command'>
1828<em>*% Map com.vendor-error to text but no page</em>
1829*cupsIPPReason com.vendor-error/A serious error occurred: ""
1830
1831<em>*% Map com.vendor-error to more than 80 characters of text but no page</em>
1832*cupsIPPReason com.vendor-error/A serious error occurred: "text:Now%20is%20the%20time
1833text:for%20all%20good%20men%20to%20come%20to%20the%20aid%20of%20their%20country."
1834
1835<em>*% Map com.vendor-error to text and a local page</em>
1836*cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html"
1837
1838<em>*% Map com.vendor-error to text and a remote page</em>
1839*cupsIPPReason com.vendor-error/A serious error occurred: "http://www.vendor.com/help"
1840
1841<em>*% Map com.vendor-error to text and a local, Apple help book, and remote page</em>
1842*APHelpBook: "file:///Library/Printers/vendor/Help.bundle"
1843*cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html
1844help:anchor='com.vendor-error'%20bookID=Vendor%20Help
1845http://www.vendor.com/help"
1846*End
1847</pre>
1848
1849
1850<h3 class="title"><span class='info'>CUPS 1.5</span><a name='cupsIPPSupplies'>cupsIPPSupplies</a></h3>
1851
1852<p class='summary'>*cupsIPPSupplies: boolean</p>
1853
1854<p>This keyword tells the IPP backend whether it should report the current marker-xxx supply attribute values. The default value is <code>True</code>.
1855
1856<p>Example:</p>
1857
1858<pre class='command'>
1859<em>*% Do not use IPP marker-xxx attributes to report supply levels</em>
1860*cupsIPPSupplies: False
1861</pre>
1862
1863
1864<h3 class="title"><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsJobAccountId'>cupsJobAccountId</a></h3>
1865
1866<p class='summary'>*cupsJobAccountId: boolean</p>
1867
1868<p>This keyword defines whether the printer accepts the job-account-id IPP attribute.</p>
1869
1870<p>Example:</p>
1871
1872<pre class='command'>
1873<em>*% Specify the printer accepts the job-account-id IPP attribute.</em>
1874*cupsJobAccountId: True
1875</pre>
1876
1877
1878<h3 class="title"><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsJobAccountingUserId'>cupsJobAccountingUserId</a></h3>
1879
1880<p class='summary'>*cupsJobAccountingUserId: boolean</p>
1881
1882<p>This keyword defines whether the printer accepts the job-accounting-user-id IPP attribute.</p>
1883
1884<p>Example:</p>
1885
1886<pre class='command'>
1887<em>*% Specify the printer accepts the job-accounting-user-id IPP attribute.</em>
1888*cupsJobAccountingUserId: True
1889</pre>
1890
1891
1892<h3 class="title"><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsJobPassword'>cupsJobPassword</a></h3>
1893
1894<p class='summary'>*cupsJobPassword: "format"</p>
1895
1896<p>This keyword defines the format of the "job-password" IPP attribute, if supported by the printer. The following format characters are supported:</p>
1897
1898<ul>
1899	<li><code>1</code>: US ASCII digits.</li>
1900	<li><code>A</code>: US ASCII letters.</li>
1901	<li><code>C</code>: US ASCII letters, numbers, and punctuation.</li>
1902	<li><code>.</code>: Any US ASCII printable character (0x20 to 0x7e).</li>
1903	<li><code>N</code>: Any Unicode digit character.</li>
1904	<li><code>U</code>: Any Unicode letter character.</li>
1905	<li><code>*</code>: Any Unicode (utf-8) character.</li>
1906</ul>
1907
1908<p>The format characters are repeated to indicate the length of the
1909password string.  For example, "1111" indicated a 4-digit US ASCII PIN code.</p>
1910
1911<p>Example:</p>
1912
1913<pre class='command'>
1914<em>*% Specify the printer supports 4-digit PIN codes.</em>
1915*cupsJobPassword: "1111"
1916</pre>
1917
1918
1919<h3 class="title"><span class='info'>CUPS 1.2/macOS 10.5</span><a name='cupsLanguages'>cupsLanguages</a></h3>
1920
1921<p class='summary'>*cupsLanguages: "locale list"</p>
1922
1923<p>This keyword describes which language localizations are
1924included in the PPD. The "locale list" string is a space-delimited
1925list of locale names ("en", "en_US", "fr_CA", etc.)</p>
1926
1927<p>Example:</p>
1928
1929<pre class='command'>
1930<em>*% Specify Canadian, UK, and US English, and Canadian and French French</em>
1931*cupsLanguages: "en_CA en_UK en_US fr_CA fr_FR"
1932</pre>
1933
1934
1935<h3 class="title"><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsMandatory'>cupsMandatory</a></h3>
1936
1937<p class='summary'>*cupsMandatory: "attribute1 attribute2 ... attributeN"</p>
1938
1939<p>This keyword defines a list of IPP attributes that must be provided when submitting a print job creation request.</p>
1940
1941<p>Example:</p>
1942
1943<pre class='command'>
1944<em>*% Specify that the user must supply a job-password</em>
1945*cupsMandatory: "job-password job-password-encryption"
1946</pre>
1947
1948
1949<h3 class="title"><a name='cupsManualCopies'>cupsManualCopies</a></h3>
1950
1951<p class='summary'>*cupsManualCopies: boolean</p>
1952
1953<p>This boolean keyword notifies the RIP filters that the
1954destination printer does not support copy generation in
1955hardware. The default value is <code>false</code>.</p>
1956
1957<p>Example:</p>
1958
1959<pre class='command'>
1960<em>*% Tell the RIP filters to generate the copies for us</em>
1961*cupsManualCopies: true
1962</pre>
1963
1964
1965<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMarkerName'>cupsMarkerName</a></h3>
1966
1967<p class='summary'>*cupsMarkerName/Name Text: ""</p>
1968
1969<p>This optional keyword maps <code>marker-names</code> strings that are
1970generated by the driver to human readable text.</p>
1971
1972<p>Examples:</p>
1973
1974<pre class='command'>
1975<em>*% Map cyanToner to "Cyan Toner"</em>
1976*cupsMarkerName cyanToner/Cyan Toner: ""
1977</pre>
1978
1979
1980<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMarkerNotice'>cupsMarkerNotice</a></h3>
1981
1982<p class='summary'>*cupsMarkerNotice: "disclaimer text"</p>
1983
1984<p>This optional keyword provides disclaimer text for the supply level
1985information provided by the driver, typically something like "supply levels
1986are approximate".</p>
1987
1988<p>Examples:</p>
1989
1990<pre class='command'>
1991*cupsMarkerNotice: "Supply levels are approximate."
1992</pre>
1993
1994
1995<h3 class="title"><span class='info'>CUPS 1.6/macOS 10.8</span><a name='cupsMaxCopies'>cupsMaxCopies</a></h3>
1996
1997<p class='summary'>*cupsMaxCopies: integer</p>
1998
1999<p>This integer keyword notifies the filters that the destination printer supports up to N copies in hardware. The default value is <code>9999</code>.</p>
2000
2001<p>Example:</p>
2002
2003<pre class='command'>
2004<em>*% Tell the RIP filters we can do up to 99 copies</em>
2005*cupsMaxCopies: 99
2006</pre>
2007
2008
2009<h3 class="title"><a name='cupsModelNumber'>cupsModelNumber</a></h3>
2010
2011<p class='summary'>*cupsModelNumber: number</p>
2012
2013<p>This integer keyword specifies a printer-specific model
2014number. This number can be used by a filter program to adjust
2015the output for a specific model of printer.</p>
2016
2017<p>Example:</p>
2018
2019<pre class='command'>
2020<em>*% Specify an integer for a driver-specific model number</em>
2021*cupsModelNumber: 1234
2022</pre>
2023
2024
2025<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsPJLCharset'>cupsPJLCharset</a></h3>
2026
2027<p class='summary'>*cupsPJLCharset: "ISO character set name"</p>
2028
2029<p>This string keyword specifies the character set that is used
2030for strings in PJL commands. If not specified, US-ASCII is
2031assumed.</p>
2032
2033<p>Example:</p>
2034
2035<pre class='command'>
2036<em>*% Specify UTF-8 is used in PJL strings</em>
2037*cupsPJLCharset: "UTF-8"
2038</pre>
2039
2040
2041<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsPJLDisplay'>cupsPJLDisplay</a></h3>
2042
2043<p class='summary'>*cupsPJLDisplay: "what"</p>
2044
2045<p>This optional keyword specifies which command is used to display the
2046job ID, name, and user on the printer's control panel. "What" is either "none"
2047to disable this functionality, "job" to use "@PJL JOB DISPLAY", or "rdymsg"
2048to use "@PJL RDYMSG DISPLAY". The default is "job".</p>
2049
2050<p>Examples:</p>
2051
2052<pre class='command'>
2053<em>*% Display job information using @PJL SET RDYMSG DISPLAY="foo"</em>
2054*cupsPJLDisplay: "rdymsg"
2055
2056<em>*% Display job information display</em>
2057*cupsPJLDisplay: "none"
2058</pre>
2059
2060
2061<h3 class="title"><span class='info'>CUPS 1.2/macOS 10.5</span><a name='cupsPortMonitor'>cupsPortMonitor</a></h3>
2062
2063<p class='summary'>*cupsPortMonitor urischeme/Descriptive Text: "port monitor"</p>
2064
2065<p>This string keyword specifies printer-specific "port
2066monitor" filters that may be used with the printer. The CUPS
2067scheduler also looks for the <tt>Protocols</tt> keyword to see
2068if the <tt>BCP</tt> or <tt>TBCP</tt> protocols are supported. If
2069so, the corresponding port monitor ("bcp" and "tbcp",
2070respectively) is listed in the printer's
2071<tt>port-monitor-supported</tt> keyword.</p>
2072
2073<p>The "urischeme" portion of the keyword specifies the URI scheme
2074that this port monitor should be used for. Typically this is used to
2075pre-select a particular port monitor for each type of connection that
2076is supported by the printer. The "port monitor" string can be "none"
2077to disable the port monitor for the given URI scheme.</p>
2078
2079<p>Examples:</p>
2080
2081<pre class='command'>
2082<em>*% Specify a PostScript printer that supports the TBCP protocol</em>
2083*Protocols: TBCP PJL
2084
2085<em>*% Specify that TBCP should be used for socket connections but not USB</em>
2086*cupsPortMonitor socket/AppSocket Printing: "tbcp"
2087*cupsPortMonitor usb/USB Printing: "none"
2088
2089<em>*% Specify a printer-specific port monitor for an Epson USB printer</em>
2090*cupsPortMonitor usb/USB Status Monitor: "epson-usb"
2091</pre>
2092
2093
2094<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsPreFilter'>cupsPreFilter</a></h3>
2095
2096<p class='summary'>*cupsPreFilter: "source/type cost program"</p>
2097
2098<p>This string keyword provides a pre-filter rule. The pre-filter
2099program will be inserted in the conversion chain immediately
2100before the filter that accepts the given MIME type.</p>
2101
2102<p>Examples:</p>
2103
2104<pre class='command'>
2105<em>*% PDF pre-filter</em>
2106*cupsPreFilter: "application/pdf 100 mypdfprefilter"
2107
2108<em>*% PNG pre-filter</em>
2109*cupsPreFilter: "image/png 0 mypngprefilter"
2110</pre>
2111
2112
2113<h3 class="title"><span class='info'>CUPS 1.5</span><a name='cupsPrintQuality'>cupsPrintQuality</a></h3>
2114
2115<p class='summary'>*cupsPrintQuality keyword/text: "code"</p>
2116
2117<p>This UI keyword defines standard print qualities that directly map from the IPP "print-quality" job template keyword. Standard keyword values are "Draft", "Normal", and "High" which are mapped from the IPP "print-quality" values 3, 4, and 5 respectively. Each <code>cupsPrintQuality</code> option typically sets output mode and resolution parameters in the page device dictionary, eliminating the need for separate (and sometimes confusing) output mode and resolution options.</p>
2118
2119<blockquote><b>Note:</b>
2120
2121<p>Unlike all of the other keywords defined in this document, <code>cupsPrintQuality</code> is a UI keyword that MUST be enclosed inside the PPD <code>OpenUI</code> and <code>CloseUI</code> keywords.</p>
2122
2123</blockquote>
2124
2125<p>Examples:</p>
2126
2127<pre class='command'>
2128*OpenUI *cupsPrintQuality/Print Quality: PickOne
2129*OrderDependency: 10 AnySetup *cupsPrintQuality
2130*DefaultcupsPrintQuality: Normal
2131*cupsPrintQuality Draft/Draft: "code"
2132*cupsPrintQuality Normal/Normal: "code"
2133*cupsPrintQuality High/Photo: "code"
2134*CloseUI: *cupsPrintQuality
2135</pre>
2136
2137
2138<h3 class="title"><span class='info'>CUPS 1.5</span><a name='cupsSingleFile'>cupsSingleFile</a></h3>
2139
2140<p class='summary'>*cupsSingleFile: Boolean</p>
2141
2142<p>This boolean keyword tells the scheduler whether to print multiple files in a job together or singly. The default is "False" which uses a single instance of the backend for all files in the print job. Setting this keyword to "True" will result in separate instances of the backend for each file in the print job.</p>
2143
2144<p>Examples:</p>
2145
2146<pre class='command'>
2147<em>*% Send all print data to a single backend</em>
2148*cupsSingleFile: False
2149
2150<em>*% Send each file using a separate backend</em>
2151*cupsSingleFile: True
2152</pre>
2153
2154
2155<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsSNMPSupplies'>cupsSNMPSupplies</a></h3>
2156
2157<p class='summary'>*cupsSNMPSupplies: boolean</p>
2158
2159<p>This keyword tells the standard network backends whether they should query
2160the standard SNMP Printer MIB OIDs for supply levels. The default value is
2161<code>True</code>.
2162
2163<p>Example:</p>
2164
2165<pre class='command'>
2166<em>*% Do not use SNMP queries to report supply levels</em>
2167*cupsSNMPSupplies: False
2168</pre>
2169
2170
2171<h3 class="title"><a name='cupsVersion'>cupsVersion</a></h3>
2172
2173<p class='summary'>*cupsVersion: major.minor</p>
2174
2175<p>This required keyword describes which version of the CUPS
2176PPD file extensions was used. Currently it must be the string
2177"1.0", "1.1", "1.2", "1.3", "1.4", "1.5", or "1.6".</p>
2178
2179<p>Example:</p>
2180
2181<pre class='command'>
2182<em>*% Specify a CUPS 1.2 driver</em>
2183*cupsVersion: "1.2"
2184</pre>
2185
2186
2187<h3 class="title"><span class="info">CUPS 1.6/macOS 10.8</span><a name="JCLToPDFInterpreter">JCLToPDFInterpreter</a></h3>
2188
2189<p class="summary">*JCLToPDFInterpreter: "JCL"</p>
2190
2191<p>This keyword provides the JCL command to insert a PDF job file into a printer-ready data stream. The JCL command is added after the <tt>JCLBegin</tt> value and any commands for JCL options in the PPD file.</p>
2192
2193<p>Example:</p>
2194
2195<pre class='command'>
2196<em>*% PJL command to start the PDF interpreter</em>
2197*JCLToPDFInterpreter: "@PJL ENTER LANGUAGE = PDF&lt;0A&gt;"
2198</pre>
2199
2200
2201<h2 class='title'><a name='MACOSX'>macOS Attributes</a></h2>
2202
2203<h3 class="title"><span class='info'>Deprecated</span><a name='APDialogExtension'>APDialogExtension</a></h3>
2204
2205<p class='summary'>*APDialogExtension: "/Library/Printers/vendor/filename.plugin"</p>
2206
2207<p>This keyword defines additional option panes that are displayed in the
2208print dialog. Each keyword adds one or more option panes. See the "OutputBinsPDE"
2209example and <a href='http://developer.apple.com/qa/qa2004/qa1352.html'>Apple
2210Technical Q&amp;A QA1352</a> for information on writing your own print dialog
2211plug-ins.</p>
2212
2213<blockquote><b>Note:</b>
2214
2215<p>Since 2010, AirPrint has enabled the printing of full quality photos and
2216documents from the Mac without requiring driver software. Starting with macOS
221710.12, system level security features prevent print dialog plug-ins from being
2218loaded into applications that have enabled the library validation security
2219feature. As of macOS 10.14 the <code>APDialogExtension</code> attribute used to
2220create macOS print drivers is deprecated. All new printer models should support
2221AirPrint moving forward.</p>
2222
2223</blockquote>
2224
2225<p>Examples:</p>
2226
2227<pre class='command'>
2228*% Add two panes for finishing and driver options
2229*APDialogExtension: "/Library/Printers/vendor/finishing.plugin"
2230*APDialogExtension: "/Library/Printers/vendor/options.plugin"
2231</pre>
2232
2233
2234<h3 class="title"><span class='info'>macOS 10.4</span><a name='APDuplexRequiresFlippedMargin'>APDuplexRequiresFlippedMargin</a></h3>
2235
2236<p class='summary'>*APDuplexRequiresFlippedMargin: boolean</p>
2237
2238<p>This boolean keyword notifies the RIP filters that the
2239destination printer requires the top and bottom margins of the
2240<tt>ImageableArea</tt> to be swapped for the back page. The
2241default is <tt>true</tt> when <tt>cupsBackSide</tt> is <tt>Flipped</tt>
2242and <tt>false</tt> otherwise. <a href='#TABLE_2'>Table 2</a> shows how
2243<tt>APDuplexRequiresFlippedMargin</tt> interacts with <tt>cupsBackSide</tt>
2244and the <tt>Tumble</tt> page attribute.</p>
2245
2246<div class='table'>
2247<table width='80%' summary='Margin Flipping Modes'>
2248<caption>Table 2: <a name='TABLE_2'>Margin Flipping Modes</a></caption>
2249<thead>
2250<tr>
2251	<th>APDuplexRequiresFlippedMargin</th>
2252	<th>cupsBackSide</th>
2253	<th>Tumble Value</th>
2254	<th>Margins</th>
2255</tr>
2256</thead>
2257<tbody>
2258<tr>
2259	<td>false</td>
2260	<td>any</td>
2261	<td>any</td>
2262	<td>Normal</td>
2263</tr>
2264<tr>
2265	<td>any</td>
2266	<td>Normal</td>
2267	<td>any</td>
2268	<td>Normal</td>
2269</tr>
2270<tr>
2271	<td>true</td>
2272	<td>ManualDuplex</td>
2273	<td>false</td>
2274	<td>Normal</td>
2275</tr>
2276<tr>
2277	<td>true</td>
2278	<td>ManualDuplex</td>
2279	<td>true</td>
2280	<td>Flipped</td>
2281</tr>
2282<tr>
2283	<td>true</td>
2284	<td>Rotated</td>
2285	<td>false</td>
2286	<td>Flipped</td>
2287</tr>
2288<tr>
2289	<td>true</td>
2290	<td>Rotated</td>
2291	<td>true</td>
2292	<td>Normal</td>
2293</tr>
2294<tr>
2295	<td>true or unspecified</td>
2296	<td>Flipped</td>
2297	<td>any</td>
2298	<td>Flipped</td>
2299</tr>
2300</tbody>
2301</table></div>
2302
2303<p>Example:</p>
2304
2305<pre class='command'>
2306<em>*% Rotate the back side images</em>
2307*cupsBackSide: Rotated
2308
2309<em>*% Don't swap the top and bottom margins for the back side</em>
2310*APDuplexRequiresFlippedMargin: false
2311</pre>
2312
2313<p>Also see the related <a href='#cupsBackSide'><tt>cupsBackSide</tt></a>
2314keyword.</p>
2315
2316
2317<h3 class="title"><a name='APHelpBook'>APHelpBook</a></h3>
2318
2319<p class='summary'>*APHelpBook: "bundle URL"</p>
2320
2321<p>This string keyword specifies the Apple help book bundle to use when
2322looking up IPP reason codes for this printer driver. The
2323<a href='#cupsIPPReason'><tt>cupsIPPReason</tt></a> keyword maps
2324"help" URIs to this file.</p>
2325
2326<p>Example:</p>
2327
2328<pre class='command'>
2329*APHelpBook: "file:///Library/Printers/vendor/Help.bundle"
2330</pre>
2331
2332
2333<h3 class="title"><span class='info'>macOS 10.6</span><a name='APICADriver'>APICADriver</a></h3>
2334
2335<p class='summary'>*APICADriver: boolean</p>
2336
2337<p>This keyword specifies whether the device has a matching Image Capture
2338Architecture (ICA) driver for scanning. The default is <tt>False</tt>.</p>
2339
2340<p>Examples:</p>
2341
2342<pre class='command'>
2343*APICADriver: True
2344*APScanAppBundleID: "com.apple.ImageCaptureApp"
2345</pre>
2346
2347
2348<h3 class="title"><span class='info'>macOS 10.3</span><a name='APPrinterIconPath'>APPrinterIconPath</a></h3>
2349
2350<p class='summary'>*APPrinterIconPath: "/Library/Printers/vendor/filename.icns"</p>
2351
2352<p>This keyword defines the location of a printer icon file to use when
2353displaying the printer. The file must be in the Apple icon format.</p>
2354
2355<p>Examples:</p>
2356
2357<pre class='command'>
2358*% Apple icon file
2359*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.icns"
2360</pre>
2361
2362
2363<h3 class="title"><span class='info'>macOS 10.4</span><a name='APPrinterLowInkTool'>APPrinterLowInkTool</a></h3>
2364
2365<p class='summary'>*APPrinterLowInkTool: "/Library/Printers/vendor/program"</p>
2366
2367<p>This keyword defines an program that checks the ink/toner/marker levels
2368on a printer, returning an XML document with those levels. See the "InkTool"
2369example and
2370<a href='http://developer.apple.com/technotes/tn2005/tn2144.html'>Apple
2371Technical Note TN2144</a> for more information.</p>
2372
2373<p>Examples:</p>
2374
2375<pre class='command'>
2376*% Use a vendor monitoring program
2377*APPrinterLowInkTool: "/Library/Printers/vendor/Tools/lowinktool"
2378</pre>
2379
2380
2381<h3 class="title"><span class='info'>macOS 10.5</span><a name='APPrinterPreset'>APPrinterPreset</a></h3>
2382
2383<p class='summary'>*APPrinterPreset name/text: "*Option Choice ..."</p>
2384
2385<p>This keyword defines presets for multiple options that show up
2386in the print dialog of applications (such as iPhoto) that set the job
2387style hint to <tt>NSPrintPhotoJobStyleHint</tt>. Each preset maps to one or
2388more pairs of PPD options and choices as well as providing key/value data for
2389the application. The following standard preset names are currently defined:</p>
2390
2391<ul>
2392
2393	<li><code>General_with_Paper_Auto-Detect</code>; Normal quality general printing with auto-detected media.</li>
2394
2395	<li><code>General_with_Paper_Auto-Detect_-_Draft</code>; Draft quality general printing with auto-detected media.</li>
2396
2397	<li><code>General_on_Plain_Paper</code>; Normal quality general printing on plain paper.</li>
2398
2399	<li><code>General_on_Plain_Paper_-_Draft</code>; Draft quality general printing on plain paper.</li>
2400
2401	<li><code>Photo_with_Paper_Auto-Detect</code>; Normal quality photo printing with auto-detected media.</li>
2402
2403	<li><code>Photo_with_Paper_Auto-Detect_-_Fine</code>; High quality photo printing with auto-detected media.</li>
2404
2405	<li><code>Photo_on_Plain_Paper</code>; Normal quality photo printing on plain paper.</li>
2406
2407	<li><code>Photo_on_Plain_Paper_-_Fine</code>; High quality photo printing on plain paper.</li>
2408
2409	<li><code>Photo_on_Photo_Paper</code>; Normal quality photo printing on glossy photo paper.</li>
2410
2411	<li><code>Photo_on_Photo_Paper_-_Fine</code>; High quality photo printing on glossy photo paper.</li>
2412
2413	<li><code>Photo_on_Matte_Paper</code>; Normal quality photo printing on matte paper.</li>
2414
2415	<li><code>Photo_on_Matte_Paper_-_Fine</code>; High quality photo printing on matte paper.</li>
2416
2417</ul>
2418
2419<p>The value string consists of pairs of keywords, either an option name and
2420choice (*MainKeyword OptionKeyword) or a preset identifier and value
2421(com.apple.print.preset.foo value). The following preset identifiers are currently used:</p>
2422
2423<ul>
2424
2425	<li><code>com.apple.print.preset.graphicsType</code>; specifies the type of printing used for this printing - "General" for general purpose printing and "Photo" for photo printing.</li>
2426
2427	<li><code>com.apple.print.preset.media-front-coating</code>; specifies the media type selected by this preset - "none" (plain paper), "glossy", "high-gloss", "semi-gloss", "satin", "matte", and "autodetect".</li>
2428
2429	<li><code>com.apple.print.preset.output-mode</code>; specifies the output mode for this preset - "color" (default for color printers) or "monochrome" (grayscale, default for B&amp;W printers).</li>
2430
2431	<li><code>com.apple.print.preset.quality</code>; specifies the overall print quality selected by this preset - "low" (draft), "mid" (normal), or "high".</li>
2432
2433</ul>
2434
2435<p>Presets, like options, can also be localized in multiple languages.</p>
2436
2437<p>Examples:</p>
2438
2439<pre class='command'>
2440*APPrinterPreset Photo_on_Photo_Paper/Photo on Photo Paper: "
2441  *MediaType Glossy
2442  *ColorModel RGB
2443  *Resolution 300dpi
2444  com.apple.print.preset.graphicsType Photo
2445  com.apple.print.preset.quality mid
2446  com.apple.print.preset.media-front-coating glossy"
2447*End
2448*fr.APPrinterPreset Photo_on_Photo_Paper/Photo sur papier photographique: ""
2449</pre>
2450
2451
2452<h3 class="title"><span class='info'>macOS 10.3</span><a name='APPrinterUtilityPath'>APPrinterUtilityPath</a></h3>
2453
2454<p class='summary'>*APPrinterPrinterUtilityPath: "/Library/Printers/vendor/filename.app"</p>
2455
2456<p>This keyword defines a GUI application that can be used to do printer
2457maintenance functions such as cleaning the print head(s). See ... for more
2458information.</p>
2459
2460<p>Examples:</p>
2461
2462<pre class='command'>
2463*% Define the printer utility application
2464*APPrinterPrinterUtilityPath: "/Library/Printers/vendor/Tools/utility.app"
2465</pre>
2466
2467
2468<h3 class="title"><span class='info'>macOS 10.6</span><a name='APScannerOnly'>APScannerOnly</a></h3>
2469
2470<p class='summary'>*APScannerOnly: boolean</p>
2471
2472<p>This keyword specifies whether the device has scanning but no printing
2473capabilities. The default is <tt>False</tt>.</p>
2474
2475<p>Examples:</p>
2476
2477<pre class='command'>
2478*APICADriver: True
2479*APScannerOnly: True
2480</pre>
2481
2482
2483<h3 class="title"><span class='info'>macOS 10.3</span><a name='APScanAppBundleID'>APScanAppBundleID</a></h3>
2484
2485<p class='summary'>*APScanAppBundleID: "bundle ID"</p>
2486
2487<p>This keyword defines the application to use when scanning pages from
2488the device.</p>
2489
2490<p>Examples:</p>
2491
2492<pre class='command'>
2493*APICADriver: True
2494*APScanAppBundleID: "com.apple.ImageCaptureApp"
2495</pre>
2496
2497
2498<h2 class='title'><a name='HISTORY'>Change History</a></h2>
2499
2500<h3 class="title">Changes in CUPS 2.3</h3>
2501
2502<ul>
2503
2504	<li>Added <a href="#cupsFinishingTemplate"><tt>cupsFinishingTemplate</tt></a> option.</li>
2505
2506</ul>
2507
2508
2509<h3 class="title">Changes in CUPS 1.7</h3>
2510
2511<ul>
2512
2513	<li>Added <a href="#cupsJobAccountId"><tt>cupsJobAccountId</tt></a>,
2514	<a href="#cupsJobAccountingUserId"><tt>cupsJobAccountingUserId</tt></a>,
2515	<a href="#cupsJobPassword"><tt>cupsJobPassword</tt></a>,
2516	<a href="#cupsMandatory"><tt>cupsMandatory</tt></a> keywords.</li>
2517
2518</ul>
2519
2520
2521<h3 class="title">Changes in CUPS 1.6</h3>
2522
2523<ul>
2524
2525	<li>Added <a href="#cupsPageSizeCategory"><tt>cupsPageSizeCategory</tt></a> keyword (originally defined in CUPS 1.4).</li>
2526
2527	<li>Added <a href="#cupsMaxCopies"><tt>cupsMaxCopies</tt></a> keyword.</li>
2528
2529	<li>Documented <a href="#JCLToPDFInterpreter"><tt>JCLToPDFInterpreter</tt></a> keyword.</li>
2530
2531	<li>Updated <a href="#cupsVersion"><tt>cupsVersion</tt></a> keyword documentation to list all current releases of CUPS.</li>
2532
2533</ul>
2534
2535
2536<h3 class="title">Changes in CUPS 1.5</h3>
2537
2538<ul>
2539
2540	<li>Changes all instances of PPD attributes to PPD keywords, to be consistent with the parent specification from Adobe.</li>
2541
2542</ul>
2543
2544
2545<h3 class="title">Changes in CUPS 1.4.5</h3>
2546
2547<ul>
2548
2549	<li>Added <a href='#cupsPrintQuality'><tt>cupsPrintQuality</tt></a> UI keyword.</li>
2550
2551	<li>Added new properties and values for the <a href='#APPrinterPreset'><tt>APPrinterPreset</tt></a> keyword.</li>
2552
2553</ul>
2554
2555
2556<h3 class="title">Changes in CUPS 1.4</h3>
2557
2558<ul>
2559
2560	<li>Added <a href='#APICADriver'><tt>APICADriver</tt></a>
2561	keyword.</li>
2562
2563	<li>Added <a href='#cupsCommands'><tt>cupsCommands</tt></a>
2564	keyword.</li>
2565
2566	<li>Added <a href='#cupsMarkerName'><tt>cupsMarkerName</tt></a>
2567	keyword.</li>
2568
2569	<li>Added <a href='#cupsMarkerNotice'><tt>cupsMarkerNotice</tt></a>
2570	keyword.</li>
2571
2572	<li>Added <a href='#cupsPJLDisplay'><tt>cupsPJLDisplay</tt></a>
2573	keyword.</li>
2574
2575	<li>Added <a href='#cupsSNMPSupplies'><tt>cupsSNMPSupplies</tt></a>
2576	keyword.</li>
2577
2578	<li>Added <a href='#cupsUIResolver'><tt>cupsUIResolver</tt></a> and
2579	<a href='#cupsUIConstraints'><tt>cupsUIConstraints</tt></a>
2580	keywords.</li>
2581
2582	<li>Added
2583	<a href='#cupsMediaQualifier2'><tt>cupsMediaQualifier2</tt></a>,
2584	<a href='#cupsMediaQualifier3'><tt>cupsMediaQualifier3</tt></a>,
2585	<a href='#cupsMinSize'><tt>cupsMinSize</tt></a>, and
2586	<a href='#cupsMaxSize'><tt>cupsMaxSize</tt></a> keywords.</li>
2587
2588</ul>
2589
2590
2591<h3 class="title">Changes in CUPS 1.3.1</h3>
2592
2593<ul>
2594
2595	<li>Added missing macOS <tt>AP</tt> keywords.</li>
2596
2597	<li>Added section on auto-configuration including the
2598	<tt>OID<i>MainKeyword</i></tt> and <tt>?<i>MainKeyword</i></tt>
2599	keywords.</li>
2600
2601	<li>Minor reorganization.</li>
2602
2603</ul>
2604
2605
2606<h3 class="title">Changes in CUPS 1.3</h3>
2607
2608<ul>
2609
2610	<li>Added <a href='#cupsBackSide'><tt>cupsBackSide</tt></a> and
2611	deprecated <a href='#cupsFlipDuplex'><tt>cupsFlipDuplex</tt></a>.</li>
2612
2613	<li>Added text URI information to
2614	<a href='#cupsIPPReason'><tt>cupsIPPReason</tt></a> documentation.</li>
2615
2616	<li>Added <a href='#APPrinterPreset'><tt>APPrinterPreset</tt></a>,
2617	<a href='#cupsIPPFinishings'><tt>cupsIPPFinishings</tt></a>, and
2618	<a href='#cupsPreFilter'><tt>cupsPreFilter</tt></a> keywords.</li>
2619
2620	<li>Added discussion of custom option code, sample
2621	<tt>CustomPageSize</tt> code, and "do not use dict and put" note.</li>
2622
2623</ul>
2624
2625
2626<h3 class="title">Changes in CUPS 1.2.8</h3>
2627
2628<ul>
2629
2630	<li>Added section on supported PostScript commands for raster
2631	drivers</li>
2632
2633</ul>
2634
2635
2636<h3 class="title">Changes in CUPS 1.2</h3>
2637
2638<ul>
2639
2640	<li>Added globalization support keywords</li>
2641
2642	<li>Added custom option values support</li>
2643
2644	<li>Added <a href='#APHelpBook'><tt>APHelpBook</tt></a> keyword</li>
2645
2646	<li>Added <a href='#APDuplexRequiresFlippedMargin'><tt>APDuplexRequiresFlippedMargin</tt></a>
2647	keyword</li>
2648
2649	<li>Added <a href='#cupsICCProfile'><tt>cupsICCProfile</tt></a> keyword</li>
2650
2651	<li>Added <a href='#cupsIPPReason'><tt>cupsIPPReason</tt></a> keyword</li>
2652
2653	<li>Added <a href='#cupsLanguages'><tt>cupsLanguages</tt></a> keyword</li>
2654
2655	<li>Added <a href='#cupsPortMonitor'><tt>cupsPortMonitor</tt></a> keyword</li>
2656
2657	<li>Removed <tt>cupsProtocol</tt> keyword</li>
2658
2659</ul>
2660
2661
2662<h3 class="title">Changes in CUPS 1.1</h3>
2663
2664<ul>
2665
2666	<li>Added <a href='#cupsFlipDuplex'><tt>cupsFlipDuplex</tt></a> keyword</li>
2667
2668	<li>Added <tt>cupsProtocol</tt> keyword</li>
2669
2670</ul>
2671    </div>
2672  </body>
2673</html>
2674