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