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