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