]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/spec-ppd.html
Merge changes from CUPS 1.4svn-r7626.
[thirdparty/cups.git] / doc / help / spec-ppd.html
CommitLineData
ef416fc2 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2<html>
4744bd90 3<!-- SECTION: Specifications -->
ef416fc2 4<head>
5 <title>CUPS PPD Extensions</title>
6 <meta name='keywords' content='Programming, PostScript Printer Description'>
db1f069b 7 <link rel='stylesheet' type='text/css' href='../cups-printable.css'>
ef416fc2 8</head>
9<body>
10<!--
2e4ff8af 11 "$Id: spec-ppd.html 6993 2007-09-28 18:05:28Z mike $"
ef416fc2 12
13 CUPS PPD extensions specification for the Common UNIX Printing System (CUPS).
14
5a738aea 15 Copyright 2007-2008 by Apple Inc.
f7deaa1a 16 Copyright 1997-2007 by Easy Software Products.
ef416fc2 17
18 These coded instructions, statements, and computer programs are the
db1f069b
MS
19 property of Apple Inc. and are protected by Federal copyright
20 law. Distribution and use rights are outlined in the file "LICENSE.txt"
21 which should have been included with this file. If this file is
22 file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 23-->
24
25<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
26
27<p>This specification describes the attributes and extensions
28that CUPS adds to <a
4744bd90 29href="http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf">
ef416fc2 30Adobe TechNote #5003: PostScript Printer Description File Format
31Specification Version 4.3</a>. PostScript Printer Description
32("PPD") files describe the capabilities of each printer and are
33used by CUPS to support printer-specific features and intelligent
34filtering.</p>
35
36<h2 class='title'><a name='SYNTAX'>PPD File Syntax</a></h2>
37
38<p>The PPD format is text-based and uses lines of up to 255
39characters terminated by a carriage return, linefeed, or
40combination of carriage return and line feed. The following ABNF
41definition [RFC2234] defines the general format of lines in a PPD
42file:</p>
43
44<pre class='command'>
45PPD-FILE = HEADER +(DATA / COMMENT / LINE-END)
46
47HEADER = "*" 0x50.50.44.2D.41.64.6F.62.65 ":" ; *PPD-Adobe:
48 *WSP DQUOTE "4.3" DQUOTE LINE-END
49
50COMMENT = "*%" *TCHAR LINE-END
51
52DATA = "*" 1*KCHAR [ WSP 1*KCHAR [ "/" 1*TCHAR ] ] ":"
53 1*(*WSP VALUE) LINE-END
54
55VALUE = 1*TCHAR / DQUOTE 1*SCHAR DQUOTE
56
57KCHAR = ALPHA / DIGIT / "_" / "." / "-"
58
59SCHAR = LINE-END / WSP / %x21 / %x23-7E / %xA0-FF
60
61TCHAR = %x20-7E / %xA0-FF
62
63LINE-END = CR / LF / CR LF
64</pre>
65
66
db1f069b 67<h2 class='title'><a name='AUTOCONFIG'>Auto-Configuration</a></h2>
ef416fc2 68
db1f069b
MS
69<p>CUPS supports several methods of auto-configuration via PPD attributes.
70<em>Currently these methods are only implemented on Mac OS X.</em></p>
4744bd90 71
db1f069b 72<h3><span class='info'>Mac OS X 10.5</span><a name='APAutoSetupTool'>APAutoSetupTool</a></h3>
4744bd90 73
db1f069b 74<p class='summary'>*APAutoSetupTool: "/LibraryPrinters/vendor/filename"</p>
4744bd90 75
db1f069b
MS
76<p>This attribute defines a program that sets the default option choices. It
77is run when a printer is added from the printer browser instead of the
78normal PostScript query and SNMP OID attribute lookups.</p>
79
80<p>The program is provided with two arguments: the printer's device URI and
81the PPD file to be used for the printer. The program must write an updated
82PPD file to stdout.</p>
83
84<p>Examples:</p>
4744bd90 85
86<pre class='command'>
db1f069b
MS
87*% Use our setup tool when adding a printer
88*APAutoSetupTool: "/Library/Printers/vendor/Tools/autosetuptool"
4744bd90 89</pre>
90
db1f069b 91<h3><span class='info'>Mac OS X 10.2</span><a name='QUERYKEYWORD'>?MainKeyword</a></h3>
a4d04587 92
db1f069b
MS
93<p class='summary'>*?<i>MainKeyword</i>: "<br>
94 PostScript query code that writes a message using the = operator...<br>
95"<br>
96*End</p>
a4d04587 97
7dfedb92 98<p>The <tt>?<i>MainKeyword</i></tt> attribute defines PostScript code that
db1f069b
MS
99determines the currently selected/enabled option keyword (choice) for the
100main keyword (option). It is typically used when communicating with USB,
101serial, Appletalk, and AppSocket (port 9100) printers.</p>
102
103<p>The PostScript code typically sends its response back using the <tt>=</tt>
104operator.</p>
ef416fc2 105
a4d04587 106<p>Example:</p>
ef416fc2 107
108<pre class='command'>
db1f069b
MS
109*OpenUI OptionDuplex/Duplexer Installed: Boolean
110*DuplexOptionDuplex: False
111*OptionDuplex False/Not Installed: ""
112*OptionDuplex True/Installed: ""
113
114<em>*% Query the printer for the presence of the duplexer option...</em>
115*?OptionDuplex: "
116 currentpagedevice /Duplex known
117 {(True)} {(False)} ifelse
118 = flush
119"
120*End
121*CloseUI: OptionDuplex
ef416fc2 122</pre>
123
db1f069b 124<h3><span class='info'>Mac OS X 10.4</span><a name='OID'>OIDMainKeyword</a></h3>
a4d04587 125
db1f069b
MS
126<p class='summary'>*?OID<i>MainKeyword</i>: ".n.n.n..."<br>
127*OID<i>MainKeyword</i> <i>OptionKeyword1</i>: "value"<br>
128...<br>
129*OID<i>MainKeyword</i> <i>OptionKeywordN</i>: "value"</p>
09a101d6 130
db1f069b
MS
131<p>The <tt>OID<i>MainKeyword</i></tt> attribute is used to define
132SNMP OIDs that map to installable options. The first (query) line
133defines the OID to lookup on the network device. The second and
134subsequent attributes define a mapping from OID value to option
135keyword. Since SNMP is an IP-based network protocol, this method
136is typically only used to configure AppSocket, IPP, and LPD network
137printers.</p>
09a101d6 138
139<p>Examples:</p>
140
141<pre class='command'>
db1f069b
MS
142*% Get the installed memory on the printer...
143*?OIDInstalledMemory: ".1.3.6.1.2.1.25.2.2.0"
144*OIDInstalledMemory 16MB: "16384 KBytes"
145*OIDInstalledMemory 32MB: "32768 KBytes"
146*OIDInstalledMemory 48MB: "49152 KBytes"
147*OIDInstalledMemory 72MB: "73728 KBytes"
09a101d6 148</pre>
149
3d8365b8 150
db1f069b 151<h2 class='title'><a name='PROFILES'>Color Profiles</a></h2>
3d8365b8 152
db1f069b
MS
153<p>CUPS supports three types of color profiles. The first type is
154based on sRGB and is used by the standard CUPS raster filters and
7dfedb92 155GPL Ghostscript. The second type is based on ICC profiles and is
db1f069b
MS
156used by the Quartz-based filters on MacOS X. The final type is
157based on well-known colorspaces such as sRGB and Adobe RGB.</p>
3d8365b8 158
db1f069b 159<blockquote><b>Note:</b>
3d8365b8 160
db1f069b
MS
161<p>At this time, none of the CUPS raster
162filters support ICC profiles. This will be addressed as time
163and resources permit.</p>
bc44d920 164
db1f069b 165</blockquote>
bc44d920 166
01ce6322 167<h3><span class='info'>Deprecated</span><a name='cupsColorProfile'>cupsColorProfile</a></h3>
bc44d920 168
db1f069b
MS
169<p class='summary'>*cupsColorProfile Resolution/MediaType: "density
170gamma m00 m01 m02 m10 m11 m12 m20 m21 m22"</p>
bc44d920 171
db1f069b
MS
172<p>This string attribute specifies an sRGB-based color profile
173consisting of gamma and density controls and a 3x3 CMY color
174transform matrix.</p>
bc44d920 175
db1f069b
MS
176<p>The <i>Resolution</i> and <i>MediaType</i> values may be "-"
177to act as a wildcard. Otherwise they must match one of the
178<tt>Resolution</tt> or <tt>MediaType</tt> attributes defined in
179the PPD file.</p>
bc44d920 180
db1f069b
MS
181<p>The <i>density</i> and <i>gamma</i> values define gamma and
182density adjustment function such that:</p>
bc44d920 183
184<pre class='command'>
db1f069b 185f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
bc44d920 186</pre>
187
db1f069b
MS
188<p>The <i>m00</i> through <i>m22</i> values define a 3x3
189transformation matrix for the CMY color values. The density
190function is applied <i>after</i> the CMY transformation:</p>
bc44d920 191
db1f069b
MS
192<pre class='command'>
193| m00 m01 m02 |
194| m10 m11 m12 |
195| m20 m21 m22 |
196</pre>
2abf387c 197
db1f069b 198<p>Examples:</p>
2abf387c 199
db1f069b
MS
200<pre class='command'>
201<em>*% Specify a profile for printing at 360dpi on all media types</em>
202*cupsColorProfile 360dpi/-: "1.0 1.5 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0"
2abf387c 203
db1f069b
MS
204<em>*% Specify a profile for printing at 720dpi on Glossy media</em>
205*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"
2abf387c 206
db1f069b
MS
207<em>*% Specify a default profile for printing at all other resolutions and media types</em>
208*cupsColorProfile -/-: "0.9 2.0 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0"
2abf387c 209</pre>
210
01ce6322 211
db1f069b 212<h3><span class='info'>Mac OS X 10.3/CUPS 1.2</span><a name='cupsICCProfile'>cupsICCProfile</a></h3>
3d8365b8 213
db1f069b
MS
214<p class='summary'>*cupsICCProfile
215ColorModel.MediaType.Resolution/Description: "filename"</p>
3d8365b8 216
db1f069b
MS
217<p>This attribute specifies an ICC color profile that is
218used to convert the document colors to the device
219colorspace. The <tt>ColorModel</tt>, <tt>MediaType</tt>, and
220<tt>Resolution</tt> keywords specify a selector for color
221profiles. If omitted, the color profile will match any option
222keyword for the corresponding main keyword.</p>
223
224<p>The <tt>Description</tt> specifies human-readable text that
225is associated with the color profile. The <tt>filename</tt>
226portion specifies the ICC color profile to use; if the filename
227is not absolute, it is loaded relative to the
228<var>/usr/share/cups/profiles</var> directory.</p>
3d8365b8 229
230<p>Examples:</p>
231
232<pre class='command'>
db1f069b
MS
233<em>*% Specify a profile for CMYK printing at 360dpi on all media types</em>
234*cupsICCProfile CMYK..360dpi/360dpi CMYK: "/Library/Printers/vendor/Profiles/foo-360-cmyk.icc"
3d8365b8 235
db1f069b
MS
236<em>*% Specify a profile for RGB printing at 720dpi on Glossy media</em>
237*cupsColorProfile RGB.Glossy.720dpi/720dpi Glossy: "/Library/Printers/vendor/Profiles/foo-720-glossy-rgb.icc"
a4d04587 238
db1f069b
MS
239<em>*% Specify a default profile for printing at all other resolutions and media types</em>
240*cupsICCProfile ../Default: "/Library/Printers/vendor/Profiles/foo-default.icc"
241</pre>
a4d04587 242
db1f069b 243<h4>Customizing the Profile Selection Keywords</h4>
ef416fc2 244
db1f069b
MS
245<p>The <tt>MediaType</tt> and <tt>Resolution</tt> keywords can be
246reassigned to different main keywords, allowing drivers to do
247color profile selection based on different parameters. The
248<tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt>
249attributes define the mapping from selector to main keyword:</p>
ef416fc2 250
251<pre class='command'>
db1f069b
MS
252*cupsICCQualifier2: MainKeyword2
253*cupsICCQualifier3: MainKeyword3
254</pre>
ef416fc2 255
db1f069b 256<p>The default mapping is as follows:</p>
ef416fc2 257
db1f069b
MS
258<pre class='command'>
259*cupsICCQualifier2: MediaType
260*cupsICCQualifier3: Resolution
ef416fc2 261</pre>
262
db1f069b 263<h3><span class='info'>Mac OS X 10.4</span><a name='APCustom'>Custom Color Matching Support</a></h3>
ef416fc2 264
db1f069b
MS
265<p class='summary'>*<a href='#APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a>: true<br>
266*<a href='#APCustomColorMatchingName'>APCustomColorMatchingName</a> name/text: ""<br>
267*<a href='#APCustomColorMatchingProfile'>APCustomColorMatchingProfile</a>: profile<br>
268*<a href='#APDefaultCustomColorMatchingProfile'>APDefaultCustomColorMatchingProfile</a>: profile</p>
a4d04587 269
db1f069b
MS
270<p>These attributes tell the Mac OS X raster filters that the printer
271driver provides its own custom color matching and that generic color
272profiles should be used when generating 1-, 3-, and 4-component raster
273data as requested by the driver. The <tt>APCustomColorMatchingProfile</tt>
274and <tt>APDefaultColorMatchingProfile</tt> attributes specify alternate
275color profiles (sRGB or AdobeRGB) to use for 3-color (RGB) raster data.</p>
09a101d6 276
db1f069b 277<h4><span class='info'>Mac OS X 10.5</span><a name='APCustomColorMatchingName'>APCustomColorMatchingName</a></h4>
09a101d6 278
db1f069b 279<p class='summary'>*APCustomColorMatchingName name/text: ""</p>
ef416fc2 280
db1f069b
MS
281<p>This attribute defines an alternate name for the color matching
282provided by a driver in the <var>Color Matching</var> print panel.
283The default is to use the name "Vendor Matching" or its localized
284equivalent.</p>
285
286<p>Examples:</p>
ef416fc2 287
288<pre class='command'>
db1f069b
MS
289*% Define the names for our color matching...
290*APCustomColorMatchingName name/AcmeColor(tm): ""
291*fr.APCustomColorMatchingName name/La AcmeColor(tm): ""
ef416fc2 292</pre>
293
db1f069b 294<h4><span class='info'>Mac OS X 10.5</span><a name='APCustomColorMatchingProfile'>APCustomColorMatchingProfile</a></h4>
bc44d920 295
db1f069b 296<p class='summary'>*APCustomColorMatchingProfile: name</p>
a4d04587 297
db1f069b
MS
298<p>This attribute defines a supported RGB color profile that can be used
299when doing custom color matching. Currently only <tt>sRGB</tt> and
300<tt>AdobeRGB</tt> are supported. If not specified, RGB data will use the
301Generic RGB colorspace.</p>
09a101d6 302
db1f069b 303<blockquote><b>Note:</b>
09a101d6 304
db1f069b
MS
305<p>If you provide multiple <tt>APCustomColorMatchingProfile</tt> attributes,
306you are responsible for providing the necessary user interface controls to
307select the profile in a <a href='#APDialogExtension'>print dialog pane</a>.
308Add the named profile to the print settings using the key
309<tt>kPMCustomColorMatchingProfileKey</tt>.</p>
310
311</blockquote>
09a101d6 312
313<p>Examples:</p>
314
315<pre class='command'>
db1f069b
MS
316*% Use sRGB for RGB color by default, but support both sRGB and AdobeRGB
317*APSupportsCustomColorMatching: true
318*APDefaultCustomColorMatchingProfile: sRGB
319*APCustomColorMatchingProfile: sRGB
320*APCustomColorMatchingProfile: AdobeRGB
09a101d6 321</pre>
322
db1f069b 323<h4><span class='info'>Mac OS X 10.5</span><a name='APDefaultCustomColorMatchingProfile'>APDefaultCustomColorMatchingProfile</a></h4>
4744bd90 324
db1f069b 325<p class='summary'>*APDefaultCustomColorMatchingProfile: name</p>
4744bd90 326
db1f069b
MS
327<p>This attribute defines the default RGB color profile that will be used
328when doing custom color matching. Currently only <tt>sRGB</tt> and
329<tt>AdobeRGB</tt> are supported.</p>
bc44d920 330
4744bd90 331<p>Examples:</p>
332
333<pre class='command'>
db1f069b
MS
334*% Use sRGB for RGB color by default
335*APSupportsCustomColorMatching: true
336*APDefaultCustomColorMatchingProfile: sRGB
4744bd90 337</pre>
338
db1f069b 339<h4><span class='info'>Mac OS X 10.4</span><a name='APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a></h4>
a4d04587 340
db1f069b 341<p class='summary'>*APSupportsCustomColorMatching: boolean</p>
a4d04587 342
db1f069b
MS
343<p>This attribute specifies that the driver provides its own custom color
344matching. When <tt>true</tt>, the default hand-off colorspace will be
345Generic Gray, Generic RGB, or Generic CMYK depending on the number of
346components the driver requests. The <a
347href='#APDefaultCustomColorMatchingProfile'><tt>APDefaultCustomColorMatchingProfile</tt></a>
348attribute can be used to override the default 3-component (RGB) colorspace.</p>
a4d04587 349
db1f069b
MS
350<p>The default for <tt>APSupportsCustomColorMatching</tt> is <tt>false</tt>.</p>
351
352<p>Examples:</p>
a4d04587 353
354<pre class='command'>
db1f069b
MS
355*APSupportsCustomColorMatching: true
356*APDefaultCustomColorMatchingProfile: sRGB
a4d04587 357</pre>
358
ef416fc2 359
db1f069b 360<h2 class='title'><a name='I18N'>Globalized PPD Support</a></h2>
a4d04587 361
db1f069b
MS
362<p>CUPS 1.2 and higher adds support for PPD files containing multiple
363languages by following the following additional rules:</p>
ef416fc2 364
db1f069b 365<ol>
ef416fc2 366
db1f069b 367 <li>The <tt>LanguageVersion</tt> MUST be <tt>English</tt></li>
a4d04587 368
db1f069b 369 <li>The <tt>LanguageEncoding</tt> MUST be <tt>ISOLatin1</tt></li>
ef416fc2 370
db1f069b
MS
371 <li>The <tt>cupsLanguages</tt> attribute MUST be provided and
372 list each of the supported locales in the PPD file</li>
ef416fc2 373
db1f069b
MS
374 <li>Main and option keywords MUST NOT exceed 34 (instead of 40)
375 characters to allow room for the locale prefixes in translation
376 attributes</li>
ef416fc2 377
db1f069b 378 <li>The main keyword "Translation" MUST NOT be used</li>
f7deaa1a 379
db1f069b
MS
380 <li>Translation strings included with the main and option
381 keywords MUST NOT contain characters outside the ASCII
382 subset of ISOLatin1 and UTF-8; developers wishing to use
383 characters outside ASCII MUST provide a separate set of
384 English localization attributes for the affected keywords.</li>
f7deaa1a 385
db1f069b
MS
386 <li>Localizations are specified using a locale prefix of
387 the form "ll" or "ll_CC." where "ll" is the 2-letter ISO
388 language code and "CC" is the 2-letter ISO country
389 code<ul>
390 <li>A generic language translation ("ll") SHOULD be provided with country-specific differences ("ll_CC") provided only as needed</li>
391 <li>For historical reasons, the "zh" and "zh_CN" locales map to Simplified Chinese while the "zh_TW" locale maps to Traditional Chinese</li>
392 </ul></li>
f7deaa1a 393
db1f069b
MS
394 <li>Locale-specific translation strings MUST be encoded
395 using UTF-8.</li>
f7deaa1a 396
db1f069b
MS
397 <li>Main keywords MUST be localized using one of the
398 following forms:
399 <p><tt>*ll.Translation MainKeyword/translation
400 text: ""</tt><br />
401 <tt>*ll_CC.Translation MainKeyword/translation
402 text: ""</tt></p></li>
f7deaa1a 403
db1f069b
MS
404 <li>Option keywords MUST be localized using one of the
405 following forms:
406 <p><tt>*ll.MainKeyword OptionKeyword/translation
407 text: ""</tt><br />
408 <tt>*ll_CC.MainKeyword OptionKeyword/translation
409 text: ""</tt></p></li>
f7deaa1a 410
db1f069b
MS
411 <li>Localization attributes MAY appear anywhere after the
412 first line of the PPD file</li>
f7deaa1a 413
db1f069b 414</ol>
ef416fc2 415
db1f069b 416<blockquote><b>Note:</b>
a4d04587 417
db1f069b
MS
418<p>We use a <tt>LanguageEncoding</tt> value of <tt>ISOLatin1</tt>
419and limit the allowed base translation strings to ASCII to avoid
420character coding issues that would otherwise occur. In addition,
421requiring the base translation strings to be in English allows
422for easier fallback translation when no localization is provided
423in the PPD file for a given locale.</p>
ef416fc2 424
db1f069b 425</blockquote>
a4d04587 426
ef416fc2 427<p>Examples:</p>
428
429<pre class='command'>
db1f069b
MS
430*LanguageVersion: English
431*LanguageEncoding: ISOLatin1
432*cupsLanguages: "de fr_CA"
433*ModelName: "Foobar Laser 9999"
f7deaa1a 434
db1f069b
MS
435<em>*% Localize ModelName for French and German</em>
436*fr_CA.Translation ModelName/La Foobar Laser 9999: ""
437*de.Translation ModelName/Foobar LaserDrucken 9999: ""
f7deaa1a 438
db1f069b
MS
439*cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html"
440<em>*% Localize printer-state-reason for French and German</em>
441*fr_CA.cupsIPPReason com.vendor-error/Une erreur s&egrave;rieuse s'est produite: "/help/com.vendor/error.html"
442*de.cupsIPPReason com.vendor-error/Eine ernste St&ouml;rung trat: "/help/com.vendor/error.html"
f7deaa1a 443
db1f069b 444...
f7deaa1a 445
db1f069b
MS
446*OpenUI *InputSlot/Paper Source: PickOne
447*OrderDependency: 10 AnySetup *InputSlot
448*DefaultInputSlot: Auto
449<em>*% Localize InputSlot for French and German</em>
450*fr_CA.Translation InputSlot/Papier source: ""
451*de.Translation InputSlot/Papiereinzug: ""
452*InputSlot Auto/Default: "&lt;&lt;/ManualFeed false&gt;&gt;setpagedevice"
453<em>*% Localize InputSlot=Auto for French and German</em>
454*fr_CA.InputSlot Auto/Par Defaut: ""
455*de.InputSlot Auto/Standard: ""
456*InputSlot Manual/Manual Feed: "&lt;&lt;/ManualFeed true&gt;&gt;setpagedevice"
457<em>*% Localize InputSlot=Manual for French and German</em>
458*fr_CA.InputSlot Manual/Manuel mecanisme de alimentation: ""
459*de.InputSlot Manual/Manueller Einzug: ""
460*CloseUI: *InputSlot
f7deaa1a 461</pre>
462
ef416fc2 463
ef416fc2 464<h2 class='title'><a name='OPTIONS'>Custom Options</a></h2>
465
466<p>CUPS supports custom options using an extension of the
467<tt>CustomPageSize</tt> and <tt>ParamCustomPageSize</tt>
468syntax:</p>
469
470<pre class='command'>
471*CustomFoo True: "command"
472*ParamCustomFoo Name1/Text 1: order type minimum maximum
473*ParamCustomFoo Name2/Text 2: order type minimum maximum
474...
475*ParamCustomFoo NameN/Text N: order type minimum maximum
476</pre>
477
478<p>When the base option is part of the <tt>JCLSetup</tt> section,
479the "command" string contains JCL commands with "\order"
480placeholders for each numbered parameter. The CUPS API handles
a4d04587 481any necessary value quoting for HP-PJL commands. For example, if
482the JCL command string is "@PJL SET PASSCODE=\1" and the first
483option value is "1234" then CUPS will output the string
484"@PJL SET PASSCODE=1234".</p>
ef416fc2 485
486<p>For non-<tt>JCLSetup</tt> options, the "order" value is a
487number from 1 to N and specifies the order of values as they are
a4d04587 488placed on the stack before the command. For example, if the
489PostScript command string is
490"&lt;&lt;/cupsReal1 2 1 roll&gt;&gt;setpagedevice" and the
491option value is "2.0" then CUPS will output the string
492"2.0 &lt;&lt;/cupsReal1 2 1 roll&gt;&gt;setpagedevice".</p>
ef416fc2 493
494<p>The "type" is one of the following keywords:</p>
495
496<ul>
497
498 <li><tt>curve</tt> - a real value from "minimum" to
499 "maximum" representing a gamma correction curve using the
500 function: f(x) = x <sup>value</sup></li>
501
502 <li><tt>int</tt> - an integer value from "minimum" to
503 "maximum"</li>
504
505 <li><tt>invcurve</tt> - a real value from "minimum" to
506 "maximum" representing a gamma correction curve using the
507 function: f(x) = x <sup>1 / value</sup></li>
508
509 <li><tt>passcode</tt> - a string of numbers value with a
510 minimum of "minimum" numbers and a maximum of "maximum"
a4d04587 511 numbers ("minimum" and "maximum" are numbers and passcode
512 strings are not displayed in the user interface)</li>
ef416fc2 513
514 <li><tt>password</tt> - a string value with a minimum of
515 "minimum" characters and a maximum of "maximum"
a4d04587 516 characters ("minimum" and "maximum" are numbers and password
517 strings are not displayed in the user interface)</li>
ef416fc2 518
519 <li><tt>points</tt> - a measurement value in points from
520 "minimum" to "maximum"</li>
521
522 <li><tt>real</tt> - a real value from "minimum" to
523 "maximum"</li>
524
525 <li><tt>string</tt> - a string value with a minimum of
526 "minimum" characters and a maximum of "maximum"
a4d04587 527 characters ("minimum" and "maximum" are numbers)</li>
ef416fc2 528
529</ul>
530
db1f069b
MS
531<blockquote><b>Note:</b>
532
533<p>Custom options are not directly supported by the Mac OS X Print Dialog
534nor by the CUPS web interface at this time. Vendors that use custom
535options on Mac OS X must provide their own user interface via the
536<a href='#APDialogExtension'><tt>APDialogExtension</tt></a> attribute.</p>
537
538</blockquote>
539
ef416fc2 540<p>Examples:</p>
541
542<pre class='command'>
543<em>*% Base JCL key code option</em>
a41f09e2 544*JCLOpenUI JCLPasscode/Key Code: PickOne
ef416fc2 545*OrderDependency: 10 JCLSetup *JCLPasscode
546*DefaultJCLPasscode: None
547*JCLPasscode None/No Code: ""
548*JCLPasscode 1111: "@PJL SET PASSCODE = 1111&lt;0A&gt;"
549*JCLPasscode 2222: "@PJL SET PASSCODE = 2222&lt;0A&gt;"
550*JCLPasscode 3333: "@PJL SET PASSCODE = 3333&lt;0A&gt;"
551*JCLCloseUI: *JCLPasscode
552
553<em>*% Custom JCL key code option</em>
554*CustomJCLPasscode True: "@PJL SET PASSCODE = \1&lt;0A&gt;"
555*ParamCustomJCLPasscode Code/Key Code: 1 passcode 4 4
556
557
a4d04587 558<em>*% Base PostScript watermark option</em>
559*OpenUI WatermarkText/Watermark Text: PickOne
560*OrderDependency: 10 AnySetup *WatermarkText
561*DefaultWatermarkText: None
562*WatermarkText None: ""
563*WatermarkText Draft: "&lt;&lt;/cupsString1(Draft)&gt;&gt;setpagedevice"
564*CloseUI: *WatermarkText
565
566<em>*% Custom PostScript watermark option</em>
b86bc4cf 567*CustomWatermarkText True: "&lt;&lt;/cupsString1 3 -1 roll&gt;&gt;setpagedevice"
a4d04587 568*ParamCustomWatermarkText Text: 1 string 0 32
569
570
ef416fc2 571<em>*% Base PostScript gamma/density option</em>
572*OpenUI GammaDensity/Gamma and Density: PickOne
573*OrderDependency: 10 AnySetup *GammaDensity
574*DefaultGammaDensity: Normal
575*GammaDensity Normal/Normal: "&lt;&lt;/cupsReal1 1.0/cupsReal2 1.0&gt;&gt;setpagedevice"
576*GammaDensity Light/Lighter: "&lt;&lt;/cupsReal1 0.9/cupsReal2 0.67&gt;&gt;setpagedevice"
577*GammaDensity Dark/Darker: "&lt;&lt;/cupsReal1 1.1/cupsReal2 1.5&gt;&gt;setpagedevice"
a4d04587 578*CloseUI: *GammaDensity
ef416fc2 579
580<em>*% Custom PostScript gamma/density option</em>
b86bc4cf 581*CustomGammaDensity True: "&lt;&lt;/cupsReal1 3 -1 roll/cupsReal2 5 -1&gt;&gt;setpagedevice"
ef416fc2 582*ParamCustomGammaDensity Gamma: 1 curve 0.1 10
583*ParamCustomGammaDensity Density: 2 real 0 2
584</pre>
585
586
db1f069b 587<h2 class='title'><a name='RASTERPS'>Writing PostScript Option Commands for Raster Drivers</a></h2>
a4d04587 588
db1f069b 589<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 attributes such as page size, resolution, and so forth. For example, the following code sets the page size to A4 size:</p>
ef416fc2 590
db1f069b
MS
591<pre class='command'>
592*PageSize A4: "&lt;&lt;/PageSize[595 842]&gt;&gt;setpagedevice"
593</pre>
ef416fc2 594
db1f069b 595<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>
ef416fc2 596
db1f069b
MS
597<pre class='command'>
598*CustomWatermarkText True: "&lt;&lt;/cupsString1 3 -1 roll&gt;&gt;setpagedevice"
599</pre>
ef416fc2 600
db1f069b 601<p>For a custom string value of "My Watermark", CUPS will produce the following PostScript code for the option:</p>
ef416fc2 602
603<pre class='command'>
db1f069b
MS
604(My Watermark)
605&lt;&lt;/cupsString1 3 -1 roll&gt;&gt;setpagedevice
ef416fc2 606</pre>
607
db1f069b 608<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>
ef416fc2 609
610<pre class='command'>
db1f069b 611&lt;&lt;/cupsString1(My Watermark)&gt;&gt;setpagedevice
ef416fc2 612</pre>
613
db1f069b 614<p>The resulting dictionary sets the page device attributes that are sent to your raster driver in the page header.</p>
ef416fc2 615
db1f069b 616<h3>Custom Page Size Code</a></h3>
ef416fc2 617
db1f069b 618<p>There are many possible implementations of the <tt>CustomPageSize</tt> code. For CUPS raster drivers, the following code is recommended:</p>
ef416fc2 619
db1f069b
MS
620<pre class='command'>
621*ParamCustomPageSize Width: 1 points <i>min-width max-width</i>
622*ParamCustomPageSize Height: 2 points <i>min-height max-height</i>
623*ParamCustomPageSize WidthOffset: 3 points 0 0
624*ParamCustomPageSize HeightOffset: 4 points 0 0
625*ParamCustomPageSize Orientation: 5 int 0 0
626*CustomPageSize True: "pop pop pop &lt;&lt;/PageSize[5 -2 roll]/ImagingBBox null&gt;&gt;setpagedevice"
ef416fc2 627</pre>
628
db1f069b 629<h3>Supported PostScript Operators</a></h3>
ef416fc2 630
db1f069b 631<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>
ef416fc2 632
db1f069b 633<ul>
ef416fc2 634
db1f069b 635 <li><tt>&lt;&lt;</tt> - Start a dictionary.</li>
ef416fc2 636
db1f069b 637 <li><tt>&gt;&gt;</tt> - End a dictionary.</li>
ef416fc2 638
db1f069b 639 <li><tt>[</tt> - Start an array.</li>
ef416fc2 640
db1f069b 641 <li><tt>]</tt> - End an array.</li>
ef416fc2 642
db1f069b 643 <li><tt>copy</tt> - Copy the top N objects on the stack.</li>
ef416fc2 644
db1f069b 645 <li><tt>dup</tt> - Copy the top object on the stack.</li>
ef416fc2 646
db1f069b 647 <li><tt>index</tt> - Copy the Nth from the top object on the stack.</li>
ef416fc2 648
db1f069b 649 <li><tt>pop</tt> - Pop the top object on the stack.</li>
ef416fc2 650
db1f069b 651 <li><tt>roll</tt> - Shift the top N objects on the stack.</li>
ef416fc2 652
db1f069b 653 <li><tt>setpagedevice</tt> - Set the page header values according to the key/value dictionary on the stack.</li>
ef416fc2 654
db1f069b 655</ul>
ef416fc2 656
db1f069b 657<blockquote><b>Note:</b>
ef416fc2 658
db1f069b
MS
659<p><em>Never</em> use the unsupported <tt>dict</tt> or <tt>put</tt>
660operators in your option code. These operators are typically used in
661option code dating back to Level 1 PostScript printers, which did not
662support the simpler <tt>&lt;&lt;</tt> or <tt>&gt;&gt;</tt> operators.
663If you have old option code using <tt>dict</tt> or <tt>put</tt>, you can
664rewrite it very easily to use the newer <tt>&lt;&lt;</tt> and
665<tt>&gt;&gt;</tt> operators instead. For example, the following code
666to set the page size:</p>
09a101d6 667
668<style type='text/css'><!--
669PRE B {
670 background: #000000;
671 color: #ffffff;
672 padding: 2px 5px;
673}
674--></style>
675
676<pre class='command'>
677<b>1 dict dup</b> /PageSize [612 792] <b>put</b> setpagedevice
678</pre>
679
680<p>can be rewritten as:</p>
681
682<pre class='command'>
683<b>&lt;&lt;</b> /PageSize [612 792] <b>&gt;&gt;</b> setpagedevice
684</pre>
685
686</blockquote>
687
db1f069b 688<h3>Supported Page Device Attributes</a></h3>
b86bc4cf 689
09a101d6 690<p>Table 2 shows the supported page device attributes along with PostScript code examples.</p>
b86bc4cf 691
692<div class='table'>
693<table summary='Supported Page Device Attributes'>
09a101d6 694<caption>Table 2: <a name='TABLE_2'>Supported Page Device Attributes</a></caption>
b86bc4cf 695<thead>
696<tr>
697 <th>Name(s)</th>
698 <th>Type</th>
699 <th>Description</th>
700 <th>Example(s)</th>
701</tr>
702</thead>
703<tbody>
704<tr valign='top'>
705 <td><tt>AdvanceDistance</tt></td>
706 <td>Integer</td>
707 <td>Specifies the number of points to advance roll media after printing.</td>
708 <td><tt>&lt;&lt;/AdvanceDistance 18&gt;&gt;setpagedevice</tt></td>
709</tr>
710<tr valign='top'>
711 <td><tt>AdvanceMedia</tt></td>
712 <td>Integer</td>
713 <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>
714 <td><tt>&lt;&lt;/AdvanceMedia 4&gt;&gt;setpagedevice</tt></td>
715</tr>
716<tr valign='top'>
717 <td><tt>Collate</tt></td>
718 <td>Boolean</td>
719 <td>Specifies whether collated copies are required.</td>
720 <td><tt>&lt;&lt;/Collate true&gt;&gt;setpagedevice</tt></td>
721</tr>
722<tr valign='top'>
723 <td><tt>CutMedia</tt></td>
724 <td>Integer</td>
725 <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>
726 <td><tt>&lt;&lt;/CutMedia 1&gt;&gt;setpagedevice</tt></td>
727</tr>
728<tr valign='top'>
729 <td><tt>Duplex</tt></td>
730 <td>Boolean</td>
731 <td>Specifies whether 2-sided printing is required.</td>
732 <td><tt>&lt;&lt;/Duplex true&gt;&gt;setpagedevice</tt></td>
733</tr>
734<tr valign='top'>
735 <td><tt>HWResolution</tt></td>
736 <td>Integer Array</td>
737 <td>Specifies the resolution of the page image in pixels per inch.</td>
738 <td><tt>&lt;&lt;/HWResolution[1200 1200]&gt;&gt;setpagedevice</tt></td>
739</tr>
740<tr valign='top'>
741 <td><tt>InsertSheet</tt></td>
742 <td>Boolean</td>
743 <td>Specifies whether to insert a blank sheet before the job.</td>
744 <td><tt>&lt;&lt;/InsertSheet true&gt;&gt;setpagedevice</tt></td>
745</tr>
746<tr valign='top'>
747 <td><tt>Jog</tt></td>
748 <td>Integer</td>
749 <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>
750 <td><tt>&lt;&lt;/Jog 2&gt;&gt;setpagedevice</tt></td>
751</tr>
752<tr valign='top'>
753 <td><tt>LeadingEdge</tt></td>
754 <td>Integer</td>
755 <td>Specifies the leading edge of the media: 0 = top, 1 = right, 2 = bottom, 3 = left.</td>
756 <td><tt>&lt;&lt;/LeadingEdge 0&gt;&gt;setpagedevice</tt></td>
757</tr>
758<tr valign='top'>
759 <td><tt>ManualFeed</tt></td>
760 <td>Boolean</td>
761 <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>
762 <td><tt>&lt;&lt;/ManualFeed true&gt;&gt;setpagedevice</tt></td>
763</tr>
764<tr valign='top'>
765 <td><tt>MediaClass</tt></td>
766 <td>String</td>
767 <td>Specifies a named media.</td>
768 <td><tt>&lt;&lt;/MediaClass (Invoices)&gt;&gt;setpagedevice</tt></td>
769</tr>
770<tr valign='top'>
771 <td><tt>MediaColor</tt></td>
772 <td>String</td>
773 <td>Specifies the color of the media.</td>
774 <td><tt>&lt;&lt;/MediaColor &gt;&gt;setpagedevice</tt></td>
775</tr>
776<tr valign='top'>
777 <td><tt>MediaPosition</tt></td>
778 <td>Integer</td>
779 <td>Specifies the tray or source of the media.</td>
780 <td><tt>&lt;&lt;/MediaPosition 12&gt;&gt;setpagedevice</tt></td>
781</tr>
782<tr valign='top'>
783 <td><tt>MediaType</tt></td>
784 <td>String</td>
785 <td>Specifies the general media type.</td>
786 <td><tt>&lt;&lt;/MediaType (Glossy)&gt;&gt;setpagedevice</tt></td>
787</tr>
788<tr valign='top'>
789 <td><tt>MediaWeight</tt></td>
790 <td>Integer</td>
791 <td>Specifies the media weight in grams per meter<sup>2</sup>.</td>
792 <td><tt>&lt;&lt;/MediaWeight 100&gt;&gt;setpagedevice</tt></td>
793</tr>
794<tr valign='top'>
795 <td><tt>MirrorPrint</tt></td>
796 <td>Boolean</td>
797 <td>Specifies whether to flip the output image horizontally.</td>
798 <td><tt>&lt;&lt;/MirrorPrint true&gt;&gt;setpagedevice</tt></td>
799</tr>
800<tr valign='top'>
801 <td><tt>NegativePrint</tt></td>
802 <td>Boolean</td>
803 <td>Specifies whether to invert the output image.</td>
804 <td><tt>&lt;&lt;/NegativePrint true&gt;&gt;setpagedevice</tt></td>
805</tr>
806<tr valign='top'>
807 <td><tt>NumCopies</tt></td>
808 <td>Integer</td>
809 <td>Specifies the number of copies to produce of each page.</td>
810 <td><tt>&lt;&lt;/NumCopies 100&gt;&gt;setpagedevice</tt></td>
811</tr>
812<tr valign='top'>
813 <td><tt>Orientation</tt></td>
814 <td>Integer</td>
815 <td>Specifies the orientation of the output: 0 = portrait, 1 = landscape rotated counter-clockwise, 2 = upside-down, 3 = landscape rotated clockwise.</td>
816 <td><tt>&lt;&lt;/Orientation 3&gt;&gt;setpagedevice</tt></td>
817</tr>
818<tr valign='top'>
819 <td><tt>OutputFaceUp</tt></td>
820 <td>Boolean</td>
821 <td>Specifies whether to place the media face-up in the output bin/tray.</td>
822 <td><tt>&lt;&lt;/OutputFaceUp true&gt;&gt;setpagedevice</tt></td>
823</tr>
824<tr valign='top'>
825 <td><tt>OutputType</tt></td>
826 <td>String</td>
827 <td>Specifies the output type name.</td>
828 <td><tt>&lt;&lt;/OutputType (Photo)&gt;&gt;setpagedevice</tt></td>
829</tr>
830<tr valign='top'>
831 <td><tt>PageSize</tt></td>
832 <td>Integer/Real Array</td>
833 <td>Specifies the width and length/height of the page in points.</td>
834 <td><tt>&lt;&lt;/PageSize[595 842]&gt;&gt;setpagedevice</tt></td>
835</tr>
836<tr valign='top'>
837 <td><tt>Separations</tt></td>
838 <td>Boolean</td>
839 <td>Specifies whether to produce color separations.</td>
840 <td><tt>&lt;&lt;/Separations true&gt;&gt;setpagedevice</tt></td>
841</tr>
842<tr valign='top'>
843 <td><tt>TraySwitch</tt></td>
844 <td>Boolean</td>
845 <td>Specifies whether to switch trays automatically.</td>
846 <td><tt>&lt;&lt;/TraySwitch true&gt;&gt;setpagedevice</tt></td>
847</tr>
848<tr valign='top'>
849 <td><tt>Tumble</tt></td>
850 <td>Boolean</td>
851 <td>Specifies whether the back sides of pages are rotated 180 degrees.</td>
852 <td><tt>&lt;&lt;/Tumble true&gt;&gt;setpagedevice</tt></td>
853</tr>
854<tr valign='top'>
855 <td><tt>cupsBorderlessScalingFactor</tt></td>
856 <td>Real</td>
857 <td>Specifies the amount to scale the page image dimensions.</td>
858 <td><tt>&lt;&lt;/cupsBorderlessScalingFactor 1.01&gt;&gt;setpagedevice</tt></td>
859</tr>
860<tr valign='top'>
861 <td><tt>cupsColorOrder</tt></td>
862 <td>Integer</td>
863 <td>Specifies the order of colors: 0 = chunked, 1 = banded, 2 = planar.</td>
864 <td><tt>&lt;&lt;/cupsColorOrder 0&gt;&gt;setpagedevice</tt></td>
865</tr>
866<tr valign='top'>
867 <td><tt>cupsColorSpace</tt></td>
868 <td>Integer</td>
869 <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>
7dfedb92 870 <td><tt>&lt;&lt;/cupsColorSpace 1 &gt;&gt;setpagedevice</tt></td>
b86bc4cf 871</tr>
872<tr valign='top'>
873 <td><tt>cupsCompression</tt></td>
874 <td>Integer</td>
875 <td>Specifies a driver compression type/mode.</td>
876 <td><tt>&lt;&lt;/cupsCompression 2&gt;&gt;setpagedevice</tt></td>
877</tr>
878<tr valign='top'>
879 <td><tt>cupsInteger0<br>
880 ...<br>
881 cupsInteger15</tt></td>
882 <td>Integer</td>
883 <td>Specifies driver integer values.</td>
884 <td><tt>&lt;&lt;/cupsInteger11 1234&gt;&gt;setpagedevice</tt></td>
885</tr>
886<tr valign='top'>
887 <td><tt>cupsMarkerType</tt></td>
888 <td>String</td>
889 <td>Specifies the type of ink/toner to use.</td>
890 <td><tt>&lt;&lt;/cupsMarkerType (Black+Color)&gt;&gt;setpagedevice</tt></td>
891</tr>
892<tr valign='top'>
893 <td><tt>cupsMediaType</tt></td>
894 <td>Integer</td>
895 <td>Specifies a numeric media type.</td>
896 <td><tt>&lt;&lt;/cupsMediaType 999&gt;&gt;setpagedevice</tt></td>
897</tr>
898<tr valign='top'>
899 <td><tt>cupsPageSizeName</tt></td>
900 <td>String</td>
901 <td>Specifies the name of the page size.</td>
902 <td><tt>&lt;&lt;/cupsPageSizeName (A4.Full)&gt;&gt;setpagedevice</tt></td>
903</tr>
904<tr valign='top'>
905 <td><tt>cupsPreferredBitsPerColor</tt></td>
906 <td>Integer</td>
907 <td>Specifies the preferred number of bits per color, typically 8 or 16.</td>
908 <td><tt>&lt;&lt;/cupsPreferredBitsPerColor 16&gt;&gt;setpagedevice</tt></td>
909</tr>
910<tr valign='top'>
911 <td><tt>cupsReal0<br>
912 ...<br>
913 cupsReal15</tt></td>
914 <td>Real</td>
915 <td>Specifies driver real number values.</td>
916 <td><tt>&lt;&lt;/cupsReal15 1.234&gt;&gt;setpagedevice</tt></td>
917</tr>
918<tr valign='top'>
919 <td><tt>cupsRenderingIntent</tt></td>
920 <td>String</td>
921 <td>Specifies the color rendering intent.</td>
922 <td><tt>&lt;&lt;/cupsRenderingIntent (AbsoluteColorimetric)&gt;&gt;setpagedevice</tt></td>
923</tr>
924<tr valign='top'>
925 <td><tt>cupsRowCount</tt></td>
926 <td>Integer</td>
927 <td>Specifies the number of rows of raster data to print on each line for some drivers.</td>
928 <td><tt>&lt;&lt;/cupsRowCount 24&gt;&gt;setpagedevice</tt></td>
929</tr>
930<tr valign='top'>
931 <td><tt>cupsRowFeed</tt></td>
932 <td>Integer</td>
933 <td>Specifies the number of rows to feed between passes for some drivers.</td>
934 <td><tt>&lt;&lt;/cupsRowFeed 17&gt;&gt;setpagedevice</tt></td>
935</tr>
936<tr valign='top'>
937 <td><tt>cupsRowStep</tt></td>
938 <td>Integer</td>
939 <td>Specifies the number of lines between columns/rows on the print head for some drivers.</td>
940 <td><tt>&lt;&lt;/cupsRowStep 2&gt;&gt;setpagedevice</tt></td>
941</tr>
942<tr valign='top'>
943 <td><tt>cupsString0<br>
944 ...<br>
945 cupsString15</tt></td>
946 <td>String</td>
947 <td>Specifies driver string values.</td>
948 <td><tt>&lt;&lt;/cupsString0(String Value)&gt;&gt;setpagedevice</tt></td>
949</tr>
950</tbody>
951</table></div>
952
953
db1f069b
MS
954<h2 class='title'><a name='ATTRIBUTES'>General Attributes</a></h2>
955
956<h3><span class='info'>CUPS 1.3</span><a name='cupsBackSide'>cupsBackSide</a></h3>
957
958<p class='summary'>*cupsBackSide: keyword</p>
959
960<p>This attribute requests special handling of the back side of pages
961when doing duplexed (2-sided) output. <a href='#TABLE_1'>Table 1</a>
962shows the supported keyword values for this attribute and their effect
963on the raster data sent to your driver. For example, when <tt>cupsBackSide</tt>
964is <code>Rotated</code> and <tt>Tumble</tt> is <tt>false</tt>, your driver
965will receive print data starting at the bottom right corner of the page, with
966each line going right-to-left instead of left-to-right. The default value is
967<code>Normal</code>.</p>
968
969<blockquote><b>Note:</b>
970
971<p><tt>cupsBackSide</tt> replaces the older <tt>cupsFlipDuplex</tt>
972attribute - if <tt>cupsBackSide</tt> is specified, <tt>cupsFlipDuplex</tt>
973will be ignored.</p>
974
975</blockquote>
976
977<div class='table'>
978<table width='80%' summary='Back Side Raster Coordinate System'>
979<caption>Table 1: <a name='TABLE_1'>Back Side Raster Coordinate System</a></caption>
980<thead>
981<tr>
982 <th>cupsBackSide</th>
983 <th>Tumble Value</th>
984 <th>Image Presentation</th>
985</tr>
986</thead>
987<tbody>
988<tr>
989 <td><code>Normal</code></td>
990 <td><code>false</code></td>
991 <td>Left-to-right, top-to-bottom</td>
992</tr>
993<tr>
994 <td><code>Normal</code></td>
995 <td><code>true</code></td>
996 <td>Left-to-right, top-to-bottom</td>
997</tr>
998<tr>
999 <td><code>ManualTumble</code></td>
1000 <td><code>false</code></td>
1001 <td>Left-to-right, top-to-bottom</td>
1002</tr>
1003<tr>
1004 <td><code>ManualTumble</code></td>
1005 <td><code>true</code></td>
1006 <td>Right-to-left, bottom-to-top</td>
1007</tr>
1008<tr>
1009 <td><code>Rotated</code></td>
1010 <td><code>false</code></td>
1011 <td>Right-to-left, bottom-to-top</td>
1012</tr>
1013<tr>
1014 <td><code>Rotated</code></td>
1015 <td><code>true</code></td>
1016 <td>Right-to-left, top-to-bottom</td>
1017</tr>
1018<tr>
1019 <td><code>Flipped</code> *</td>
1020 <td><code>false</code></td>
1021 <td>Left-to-right, bottom-to-top</td>
1022</tr>
1023<tr>
1024 <td><code>Flipped</code> *</td>
1025 <td><code>true</code></td>
1026 <td>Right-to-left, top-to-bottom</td>
1027</tr>
1028</tbody>
1029</table>
1030</div>
1031
1032<p><em>* - Not supported in Mac OS X 10.5.x and earlier</em></p>
1033
1034<div class='figure'><table summary='Back side images'>
1035<caption>Figure 1: Back side images</caption>
1036<tr><td><img src='../images/raster.png' width='624' height='448' alt='Back side images'></td></tr>
1037</table></div>
1038
1039<p>Examples:</p>
1040
1041<pre class='command'>
1042<em>*% Flip the page image for the back side of duplexed output</em>
1043*cupsBackSide: Flipped
1044
1045<em>*% Rotate the page image for the back side of duplexed output</em>
1046*cupsBackSide: Rotated
1047</pre>
1048
1049<p>Also see the related <a href='#APDuplexRequiresFlippedMargin'><tt>APDuplexRequiresFlippedMargin</tt></a>
1050attribute.</p>
1051
01ce6322
MS
1052<h3><span class='info'>CUPS 1.4</span><a name='cupsCommands'>cupsCommands</a></h3>
1053
1054<p class='summary'>*cupsCommands: "name name2 ... nameN"</p>
1055
1056<p>This string attribute specifies the commands that are supported by the
1057CUPS command file filter for this device. The command names are separated
1058by whitespace.</p>
1059
1060<p>Example:</p>
1061
1062<pre class='command'>
1063<em>*% Specify the list of commands we support</em>
1064*cupsCommands: "AutoConfigure Clean PrintSelfTestPage ReportLevels com.vendor.foo"
1065</pre>
1066
1067
db1f069b
MS
1068<h3><span class='info'>CUPS 1.3</span><a name='cupsEvenDuplex'>cupsEvenDuplex</a></h3>
1069
1070<p class='summary'>*cupsEvenDuplex: boolean</p>
1071
1072<p>This boolean attribute notifies the RIP filters that the
1073destination printer requires an even number of pages when 2-sided
1074printing is selected. The default value is <code>false</code>.</p>
1075
1076<p>Example:</p>
1077
1078<pre class='command'>
1079<em>*% Always send an even number of pages when duplexing</em>
1080*cupsEvenDuplex: true
1081</pre>
1082
1083<h3><a name='cupsFax'>cupsFax</a></h3>
1084
1085<p class='summary'>*cupsFax: boolean</p>
1086
1087<p>This boolean attribute specifies whether the PPD defines a facsimile device. The default is <tt>false</tt>.</p>
1088
1089<p>Examples:</p>
1090
1091<pre class='command'>
1092*cupsFax: true
1093</pre>
1094
1095<h3><a name='cupsFilter'>cupsFilter</a></h3>
1096
1097<p class='summary'>*cupsFilter: "source/type cost program"</p>
1098
1099<p>This string attribute provides a conversion rule from the
1100given source type to the printer's native format using the
1101filter "program". If a printer supports the source type directly,
1102the special filter program "-" may be specified.</p>
1103
1104<p>Examples:</p>
1105
1106<pre class='command'>
1107<em>*% Standard raster printer driver filter</em>
1108*cupsFilter: "application/vnd.cups-raster 100 rastertofoo"
1109
1110<em>*% Plain text filter</em>
1111*cupsFilter: "text/plain 10 texttofoo"
1112
1113<em>*% Pass-through filter for PostScript printers</em>
1114*cupsFilter: "application/vnd.cups-postscript 0 -"
1115</pre>
1116
1117<h3><span class='info'>Deprecated</span><a name='cupsFlipDuplex'>cupsFlipDuplex</a></h3>
1118
1119<p class='summary'>*cupsFlipDuplex: boolean</p>
1120
1121<p>Due to implementation differences between Mac OS X and Ghostscript,
1122the <tt>cupsFlipDuplex</tt> attribute is deprecated. Instead, use
1123the <a href='#cupsBackSide'><tt>cupsBackSide</tt></a> attribute to specify
1124the coordinate system (pixel layout) of the page data on the back side of
1125duplex pages.</p>
1126
1127<p>The value <code>true</code> maps to a <tt>cupsBackSide</tt> value
1128of <code>Rotated</code> on Mac OS X and <code>Flipped</code> with
1129Ghostscript.</p>
1130
1131<p>The default value is <code>false</code>.</p>
1132
1133<blockquote><b>Note:</b>
1134
1135<p>Mac OS X drivers that previously used
1136<tt>cupsFlipDuplex</tt> may wish to provide both the old and
1137new attributes for maximum compatibility, for example:</p>
1138
1139<pre class='command'>
1140*cupsBackSide: Rotated
1141*cupsFlipDuplex: true
1142</pre>
1143
1144<p>Similarly, drivers written for other operating systems using
1145Ghostscript can use:</p>
1146
1147<pre class='command'>
1148*cupsBackSide: Flipped
1149*cupsFlipDuplex: true
1150</pre></blockquote>
1151
1152<h3><span class='info'>CUPS 1.3</span><a name='cupsIPPFinishings'>cupsIPPFinishings</a></h3>
1153
1154<p class='summary'>*cupsIPPFinishings number/text: "*Option Choice ..."</p>
1155
1156<p>This attribute defines a mapping from IPP <code>finishings</code>
1157values to PPD options and choices.</p>
1158
1159<p>Examples:</p>
1160
1161<pre class='command'>
1162*cupsIPPFinishings 4/staple: "*StapleLocation SinglePortrait"
1163*cupsIPPFinishings 5/punch: "*PunchMedia Yes *PunchLocation LeftSide"
1164*cupsIPPFinishings 20/staple-top-left: "*StapleLocation SinglePortrait"
1165*cupsIPPFinishings 21/staple-bottom-left: "*StapleLocation SingleLandscape"
1166</pre>
1167
1168<h3><span class='info'>CUPS 1.3</span><a name='cupsIPPReason'>cupsIPPReason</a></h3>
1169
1170<p class='summary'>*cupsIPPReason reason/Reason Text: "optional URIs"</p>
1171
1172<p>This optional attribute maps custom
1173<code>printer-state-reasons</code> keywords that are generated by
1174the driver to human readable text. The optional URIs string
1175contains zero or more URIs separated by a newline. Each URI can
1176be a CUPS server absolute path to a help file under the
1177scheduler's <code>DocumentRoot</code> directory, a full HTTP URL
1178("http://www.domain.com/path/to/help/page.html"), or any other
1179valid URI which directs the user at additional information
1180concerning the condition that is being reported.</p>
1181
1182<p>Since the reason text is limited to 80 characters by the PPD specification,
1183longer text strings can be included by URI-encoding the text with the "text"
1184scheme, for example "text:some%20text". Multiple <code>text</code> URIs are
1185combined (with spaces between each URI) by the <tt>ppdLocalizeIPPReason</tt>
1186into a single string that can be displayed to the user.</p>
1187
1188<p>Examples:</p>
1189
1190<pre class='command'>
1191<em>*% Map com.vendor-error to text but no page</em>
1192*cupsIPPReason com.vendor-error/A serious error occurred: ""
1193
1194<em>*% Map com.vendor-error to more than 80 characters of text but no page</em>
1195*cupsIPPReason com.vendor-error/A serious error occurred: "text:Now%20is%20the%20time
1196text:for%20all%20good%20men%20to%20come%20to%20the%20aid%20of%20their%20country."
1197
1198<em>*% Map com.vendor-error to text and a local page</em>
1199*cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html"
1200
1201<em>*% Map com.vendor-error to text and a remote page</em>
1202*cupsIPPReason com.vendor-error/A serious error occurred: "http://www.vendor.com/help"
1203
1204<em>*% Map com.vendor-error to text and a local, Apple help book, and remote page</em>
839a51c8 1205*APHelpBook: "file:///Library/Printers/vendor/Help.bundle"
db1f069b
MS
1206*cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html
1207help:anchor='com.vendor-error'%20bookID=Vendor%20Help
1208http://www.vendor.com/help"
1209*End
1210</pre>
1211
1212<h3><span class='info'>CUPS 1.2</span><a name='cupsLanguages'>cupsLanguages</a></h3>
1213
1214<p class='summary'>*cupsLanguages: "locale list"</p>
1215
1216<p>This attribute describes which language localizations are
1217included in the PPD. The "locale list" string is a space-delimited
1218list of locale names ("en", "en_US", "fr_CA", etc.)</p>
1219
1220<p>Example:</p>
1221
1222<pre class='command'>
1223<em>*% Specify Canadian, UK, and US English, and Candian and French French</em>
5a738aea 1224*cupsLanguages: "en_CA en_UK en_US fr_CA fr_FR"
db1f069b
MS
1225</pre>
1226
1227<h3><a name='cupsManualCopies'>cupsManualCopies</a></h3>
1228
1229<p class='summary'>*cupsManualCopies: boolean</p>
1230
1231<p>This boolean attribute notifies the RIP filters that the
1232destination printer does not support copy generation in
1233hardware. The default value is <code>false</code>.</p>
1234
1235<p>Example:</p>
1236
1237<pre class='command'>
1238<em>*% Tell the RIP filters to generate the copies for us</em>
1239*cupsManualCopies: true
1240</pre>
1241
634763e8
MS
1242<h3><span class='info'>CUPS 1.4</span><a name='cupsMarkerName'>cupsMarkerName</a></h3>
1243
1244<p class='summary'>*cupsMarkerName/Name Text: ""</p>
1245
1246<p>This optional attribute maps <code>marker-names</code> strings that are
1247generated by the driver to human readable text.</p>
1248
1249<p>Examples:</p>
1250
1251<pre class='command'>
1252<em>*% Map cyanToner to "Cyan Toner"</em>
1253*cupsMarkerName cyanToner/Cyan Toner: ""
1254</pre>
1255
db1f069b
MS
1256<h3><a name='cupsModelNumber'>cupsModelNumber</a></h3>
1257
1258<p class='summary'>*cupsModelNumber: number</p>
1259
1260<p>This integer attribute specifies a printer-specific model
1261number. This number can be used by a filter program to adjust
1262the output for a specific model of printer.</p>
1263
1264<p>Example:</p>
1265
1266<pre class='command'>
1267<em>*% Specify an integer for a driver-specific model number</em>
1268*cupsModelNumber: 1234
1269</pre>
1270
db1f069b
MS
1271<h3><span class='info'>CUPS 1.3</span><a name='cupsPJLCharset'>cupsPJLCharset</a></h3>
1272
1273<p class='summary'>*cupsPJLCharset: "ISO character set name"</p>
1274
1275<p>This string attribute specifies the character set that is used
1276for strings in PJL commands. If not specified, US-ASCII is
1277assumed.</p>
1278
1279<p>Example:</p>
1280
1281<pre class='command'>
1282<em>*% Specify UTF-8 is used in PJL strings</em>
1283*cupsPJLCharset: "UTF-8"
1284</pre>
1285
634763e8
MS
1286<h3><span class='info'>CUPS 1.4</span><a name='cupsPJLDisplay'>cupsPJLDisplay</a></h3>
1287
1288<p class='summary'>*cupsPJLDisplay: "what"</p>
1289
1290<p>This optional attribute specifies which command is used to display the
1291job ID, name, and user on the printer's control panel. "What" is either "none"
1292to disable this functionality, "job" to use "@PJL JOB DISPLAY", or "rdymsg"
1293to use "@PJL RDYMSG DISPLAY". The default is "job".</p>
1294
1295<p>Examples:</p>
1296
1297<pre class='command'>
1298<em>*% Display job information using @PJL SET RDYMSG DISPLAY="foo"</em>
1299*cupsPJLDisplay: "rdymsg"
1300
1301<em>*% Display job information display</em>
1302*cupsPJLDisplay: "none"
1303</pre>
db1f069b
MS
1304
1305<h3><span class='info'>CUPS 1.2</span><a name='cupsPortMonitor'>cupsPortMonitor</a></h3>
1306
1307<p class='summary'>*cupsPortMonitor urischeme/Descriptive Text: "port monitor"</p>
1308
1309<p>This string attribute specifies printer-specific "port
1310monitor" filters that may be used with the printer. The CUPS
1311scheduler also looks for the <tt>Protocols</tt> attribute to see
1312if the <tt>BCP</tt> or <tt>TBCP</tt> protocols are supported. If
1313so, the corresponding port monitor ("bcp" and "tbcp",
1314respectively) is listed in the printer's
1315<tt>port-monitor-supported</tt> attribute.</p>
1316
1317<p>The "urischeme" portion of the attribute specifies the URI scheme
1318that this port monitor should be used for. Typically this is used to
1319pre-select a particular port monitor for each type of connection that
1320is supported by the printer. The "port monitor" string can be "none"
1321to disable the port monitor for the given URI scheme.</p>
1322
1323<p>Examples:</p>
1324
1325<pre class='command'>
1326<em>*% Specify a PostScript printer that supports the TBCP protocol</em>
1327*Protocols: TBCP PJL
1328
1329<em>*% Specify that TBCP should be used for socket connections but not USB</em>
1330*cupsPortMonitor socket/AppSocket Printing: "tbcp"
1331*cupsPortMonitor usb/USB Printing: "none"
1332
1333<em>*% Specify a printer-specific port monitor for an Epson USB printer</em>
1334*cupsPortMonitor usb/USB Status Monitor: "epson-usb"
1335</pre>
1336
1337<h3><span class='info'>CUPS 1.3</span><a name='cupsPreFilter'>cupsPreFilter</a></h3>
1338
1339<p class='summary'>*cupsPreFilter: "source/type cost program"</p>
1340
1341<p>This string attribute provides a pre-filter rule. The pre-filter
1342program will be inserted in the conversion chain immediately
1343before the filter that accepts the given MIME type.</p>
1344
1345<p>Examples:</p>
1346
1347<pre class='command'>
1348<em>*% PDF pre-filter</em>
1349*cupsPreFilter: "application/pdf 100 mypdfprefilter"
1350
1351<em>*% PNG pre-filter</em>
1352*cupsPreFilter: "image/png 0 mypngprefilter"
1353</pre>
1354
1355<h3><a name='cupsVersion'>cupsVersion</a></h3>
1356
1357<p class='summary'>*cupsVersion: major.minor</p>
1358
1359<p>This required attribute describes which version of the CUPS
1360PPD file extensions was used. Currently it must be the string
1361"1.0", "1.1", "1.2", or "1.3".</p>
1362
1363<p>Example:</p>
1364
1365<pre class='command'>
1366<em>*% Specify a CUPS 1.2 driver</em>
1367*cupsVersion: "1.2"
1368</pre>
1369
1370
1371<h2 class='title'><a name='MACOSX'>Mac OS X Attributes</a></h2>
1372
db1f069b
MS
1373<h3><span class='info'>Mac OS X 10.3</span><a name='APDialogExtension'>APDialogExtension</a></h3>
1374
1375<p class='summary'>*APDialogExtension: "/Library/Printers/vendor/filename.plugin"</p>
1376
1377<p>This attribute defines additional option panes that are displayed in the
1378print dialog. Each attribute adds one or more option panes. See the "OutputBinsPDE"
1379example and <a href='http://developer.apple.com/qa/qa2004/qa1352.html'>Apple
1380Technical Q&amp;A QA1352</a> for information on writing your own print dialog
1381plug-ins.</p>
1382
1383<blockquote><b>Note:</b>
1384
1385<p>Starting with Mac OS X 10.5, each plug-in must be compiled "4-way fat"
1386(32-bit and 64-bit for both PowerPC and Intel) with garbage collection enabled
1387in order to be usable with all applications.</p>
1388
1389</blockquote>
1390
1391<p>Examples:</p>
1392
1393<pre class='command'>
1394*% Add two panes for finishing and driver options
1395*APDialogExtension: "/Library/Printers/vendor/finishing.plugin"
1396*APDialogExtension: "/Library/Printers/vendor/options.plugin"
1397</pre>
1398
1399<h3><span class='info'>Mac OS X 10.4</span><a name='APDuplexRequiresFlippedMargin'>APDuplexRequiresFlippedMargin</a></h3>
1400
1401<p class='summary'>*APDuplexRequiresFlippedMargin: boolean</p>
1402
1403<p>This boolean attribute notifies the RIP filters that the
1404destination printer requires the top and bottom margins of the
1405<tt>ImageableArea</tt> to be swapped for the back page. The
1406default is <tt>true</tt> when <tt>cupsBackSide</tt> is <tt>Flipped</tt>
1407and <tt>false</tt> otherwise. <a href='#TABLE_2'>Table 2</a> shows how
1408<tt>APDuplexRequiresFlippedMargin</tt> interacts with <tt>cupsBackSide</tt>
1409and the <tt>Tumble</tt> page attribute.</p>
1410
1411<div class='table'>
1412<table width='80%' summary='Margin Flipping Modes'>
1413<caption>Table 2: <a name='TABLE_2'>Margin Flipping Modes</a></caption>
1414<thead>
1415<tr>
1416 <th>APDuplexRequiresFlippedMargin</th>
1417 <th>cupsBackSide</th>
1418 <th>Tumble Value</th>
1419 <th>Margins</th>
1420</tr>
1421</thead>
1422<tbody>
1423<tr>
1424 <td>false</td>
1425 <td>any</td>
1426 <td>any</td>
1427 <td>Normal</td>
1428</tr>
1429<tr>
1430 <td>any</td>
1431 <td>Normal</td>
1432 <td>any</td>
1433 <td>Normal</td>
1434</tr>
1435<tr>
1436 <td>true</td>
1437 <td>ManualDuplex</td>
1438 <td>false</td>
1439 <td>Normal</td>
1440</tr>
1441<tr>
1442 <td>true</td>
1443 <td>ManualDuplex</td>
1444 <td>true</td>
1445 <td>Flipped</td>
1446</tr>
1447<tr>
1448 <td>true</td>
1449 <td>Rotated</td>
1450 <td>false</td>
1451 <td>Flipped</td>
1452</tr>
1453<tr>
1454 <td>true</td>
1455 <td>Rotated</td>
1456 <td>true</td>
1457 <td>Normal</td>
1458</tr>
1459<tr>
1460 <td>true or unspecified</td>
1461 <td>Flipped</td>
1462 <td>any</td>
1463 <td>Flipped</td>
1464</tr>
1465</tbody>
1466</table></div>
1467
1468<p>Example:</p>
1469
1470<pre class='command'>
1471<em>*% Rotate the back side images</em>
1472*cupsBackSide: Rotated
1473
1474<em>*% Don't swap the top and bottom margins for the back side</em>
1475*APDuplexRequiresFlippedMargin: false
1476</pre>
1477
1478<p>Also see the related <a href='#cupsBackSide'><tt>cupsBackSide</tt></a>
1479attribute.</p>
1480
64a69576
MS
1481<h3><a name='APHelpBook'>APHelpBook</a></h3>
1482
839a51c8 1483<p class='summary'>*APHelpBook: "bundle URL"</p>
64a69576 1484
839a51c8 1485<p>This string attribute specifies the Apple help book bundle to use when
64a69576
MS
1486looking up IPP reason codes for this printer driver. The
1487<a href='#cupsIPPReason'><tt>cupsIPPReason</tt></a> attribute maps
1488"help" URIs to this file.</p>
1489
1490<p>Example:</p>
1491
1492<pre class='command'>
839a51c8 1493*APHelpBook: "file:///Library/Printers/vendor/Help.bundle"
64a69576
MS
1494</pre>
1495
db1f069b
MS
1496<h3><span class='info'>Mac OS X 10.3</span><a name='APPrinterIconPath'>APPrinterIconPath</a></h3>
1497
1498<p class='summary'>*APPrinterIconPath: "/Library/Printers/vendor/filename"</p>
1499
1500<p>This attribute defines the location of a printer icon file to use when
1501displaying the printer.</p>
1502
1503<p>Examples:</p>
1504
1505<pre class='command'>
1506*% Apple icon file
1507*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.icns"
1508
1509*% TIFF icon file
1510*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.tiff"
1511
1512*% PNG icon file
1513*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.png"
1514
1515*% JPEG icon file
1516*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.jpg"
1517</pre>
1518
1519<h3><span class='info'>Mac OS X 10.4</span><a name='APPrinterLowInkTool'>APPrinterLowInkTool</a></h3>
1520
1521<p class='summary'>*APPrinterLowInkTool: "/Library/Printers/vendor/program"</p>
1522
1523<p>This attribute defines an program that checks the ink/toner/marker levels
1524on a printer, returning an XML document with those levels. See the "InkTool"
1525example and
1526<a href='http://developer.apple.com/technotes/tn2005/tn2144.html'>Apple
1527Technical Note TN2144</a> for more information.</p>
1528
1529<p>Examples:</p>
1530
1531<pre class='command'>
1532*% Use a vendor monitoring program
1533*APPrinterLowInkTool: "/Library/Printers/vendor/Tools/lowinktool"
1534</pre>
1535
1536<h3><span class='info'>Mac OS X 10.5</span><a name='APPrinterPreset'>APPrinterPreset</a></h3>
1537
1538<p class='summary'>*APPrinterPreset name/text: "*Option Choice ..."</p>
1539
1540<p>This attribute defines presets for multiple options that show up
1541in the print dialog of applications (such as iPhoto) that set the job
1542style hint to <tt>NSPrintPhotoJobStyleHint</tt>. Each preset maps to one or
1543more pairs of PPD options and choices as well as providing key/value data for
1544the application. The following preset names are currently defined:</p>
1545
1546<ul>
1547
1548 <li><code>Photo_with_Paper_Auto-Detect</code>; Photo printing
1549 with paper auto-detect</li>
1550
1551 <li><code>Photo_with_Paper_Auto-Detect_-_Fine</code>; Photo printing
1552 with paper auto-detect - fine</li>
1553
1554 <li><code>Photo_on_Plain_Paper</code>; Photo printing on plain paper</li>
1555
1556 <li><code>Photo_on_Plain_Paper_-_Fine</code>; Photo printing on plain
1557 paper - fine</li>
1558
1559 <li><code>Photo_on_Photo_Paper</code>; Photo printing on photo paper</li>
1560
1561 <li><code>Photo_on_Photo_Paper_-_Fine</code>; Photo printing on photo
1562 paper - fine</li>
1563
1564 <li><code>Photo_on_Matte_Paper</code>; Photo printing on matte paper</li>
1565
1566 <li><code>Photo_on_Matte_Paper_-_Fine</code>; Photo printing on matte
1567 paper - fine</li>
1568
1569</ul>
1570
1571<p>The value string consists of pairs of keywords, either an option name and
1572choice (*MainKeyword OptionKeyword) or a preset identifier and value
1573(com.apple.print.preset.foo value). Preset identifiers and their supported
1574values are documented in "<a
1575href='http://developer.apple.com/documentation/Printing/Conceptual/PresetDraft/presets_intro/chapter_1_section_2.html'
1576>Creating Printing Presets for iPhoto: Printing Presets File Format</a>".</p>
1577
1578<p>Presets, like options, can also be localized in multiple languages.</p>
1579
1580<p>Examples:</p>
1581
1582<pre class='command'>
1583*APPrinterPreset Photo_on_Photo_Paper/Photo on Photo Paper: "
1584 *MediaType Glossy
1585 *ColorModel RGB
1586 *Resolution 300dpi
1587 com.apple.print.preset.graphicsType Photo
1588 com.apple.print.preset.quality mid
1589 com.apple.print.preset.media-front-coating glossy"
1590*End
1591*fr.APPrinterPreset Photo_on_Photo_Paper/Photo sur papier photographique: ""
1592</pre>
1593
1594<h3><span class='info'>Mac OS X 10.3</span><a name='APPrinterUtilityPath'>APPrinterUtilityPath</a></h3>
1595
1596<p class='summary'>*APPrinterPrinterUtilityPath: "/Library/Printers/vendor/filename.app"</p>
1597
1598<p>This attribute defines a GUI application that can be used to do printer
1599maintenance functions such as cleaning the print head(s). See ... for more
1600information.</p>
1601
1602<p>Examples:</p>
1603
1604<pre class='command'>
1605*% Define the printer utility application
1606*APPrinterPrinterUtilityPath: "/Library/Printers/vendor/Tools/utility.app"
1607</pre>
1608
1609<h3><span class='info'>Mac OS X 10.3</span><a name='APScanAppBundleID'>APScanAppBundleID</a></h3>
1610
1611<p class='summary'>*APScanAppBundleID: "bundle ID"</p>
1612
1613<p>This attribute defines the application to use when scanning pages from
1614the device.</p>
1615
1616<p>Examples:</p>
1617
1618<pre class='command'>
1619*APScanAppBundleID: "com.apple.ImageCaptureApp"
1620</pre>
1621
1622
1623<h2 class='title'><a name='HISTORY'>Change History</a></h2>
1624
634763e8
MS
1625<h3>Changes in CUPS 1.4</a></h3>
1626
1627<ul>
1628
1629 <li>Added <tt>cupsPJLDisplay</tt> attribute.</li>
1630
1631 <li>Added <tt>cupsMarkerName</tt> attribute.</li>
1632
01ce6322
MS
1633 <li>Added <tt>cupsCommands</tt> attribute.</li>
1634
634763e8
MS
1635</ul>
1636
1637
db1f069b
MS
1638<h3>Changes in CUPS 1.3.1</a></h3>
1639
1640<ul>
1641
1642 <li>Added missing Mac OS X <tt>AP</tt> attributes.</li>
1643
1644 <li>Added section on auto-configuration including the
1645 <tt>OID<i>MainKeyword</i></tt> and <tt>?<i>MainKeyword</i></tt>
1646 attributes.</li>
1647
1648 <li>Minor reorganization.</li>
1649
1650</ul>
1651
ef416fc2 1652
db1f069b 1653<h3>Changes in CUPS 1.3</a></h3>
f7deaa1a 1654
1655<ul>
1656
bc44d920 1657 <li>Added <tt>cupsBackSide</tt> and deprecated <tt>cupsFlipDuplex</tt>.</li>
1658
1659 <li>Added text URI information to <tt>cupsIPPReason</tt> documentation.</li>
1660
09a101d6 1661 <li>Added <tt>APPrinterPreset</tt>, <tt>cupsIPPFinishings</tt>, and <tt>cupsPreFilter</tt> attributes.</li>
1662
1663 <li>Added discussion of custom option code, sample <tt>CustomPageSize</tt> code, and "do not use dict and put" note.</li>
f7deaa1a 1664
1665</ul>
1666
db1f069b 1667<h3>Changes in CUPS 1.2.8</a></h3>
b86bc4cf 1668
1669<ul>
1670
1671 <li>Added section on supported PostScript commands for raster
1672 drivers</li>
1673
1674</ul>
1675
db1f069b 1676<h3>Changes in CUPS 1.2</a></h3>
ef416fc2 1677
1678<ul>
1679
ecdc0628 1680 <li>Added globalization support attributes</li>
ef416fc2 1681
1682 <li>Added custom option values support</li>
1683
839a51c8 1684 <li>Added <tt>APHelpBook</tt> attribute</li>
4744bd90 1685
a4d04587 1686 <li>Added <tt>APDuplexRequiresFlippedMargin</tt> attribute</li>
1687
ef416fc2 1688 <li>Added <tt>cupsICCProfile</tt> attribute</li>
1689
4744bd90 1690 <li>Added <tt>cupsIPPReason</tt> attribute</li>
1691
a4d04587 1692 <li>Added <tt>cupsLanguages</tt> attribute</li>
1693
ef416fc2 1694 <li>Added <tt>cupsPortMonitor</tt> attribute</li>
1695
1696 <li>Removed <tt>cupsProtocol</tt> attribute</li>
1697
1698</ul>
1699
db1f069b 1700<h3>Changes in CUPS 1.1</a></h3>
ef416fc2 1701
1702<ul>
1703
1704 <li>Added <tt>cupsFlipDuplex</tt> attribute</li>
1705
1706 <li>Added <tt>cupsProtocol</tt> attribute</li>
1707
1708</ul>
1709
1710</body>
1711</html>