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