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