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