]>
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'> | |
a4d04587 | 7 | <link rel='stylesheet' type='text/css' href='../cups.css'> |
ef416fc2 | 8 | </head> |
9 | <body> | |
10 | <!-- | |
f7faf1f5 | 11 | "$Id: spec-ppd.html 5496 2006-05-05 19:26:23Z mike $" |
ef416fc2 | 12 | |
13 | CUPS PPD extensions specification for the Common UNIX Printing System (CUPS). | |
14 | ||
15 | Copyright 1997-2006 by Easy Software Products. | |
16 | ||
17 | These coded instructions, statements, and computer programs are the | |
18 | property of Easy Software Products and are protected by Federal | |
19 | copyright law. Distribution and use rights are outlined in the file | |
20 | "LICENSE.txt" which should have been included with this file. If this | |
21 | file is missing or damaged please contact Easy Software Products | |
22 | at: | |
23 | ||
24 | Attn: CUPS Licensing Information | |
25 | Easy Software Products | |
26 | 44141 Airport View Drive, Suite 204 | |
27 | Hollywood, Maryland 20636 USA | |
28 | ||
29 | Voice: (301) 373-9600 | |
30 | EMail: cups-info@cups.org | |
31 | WWW: http://www.cups.org | |
32 | --> | |
33 | ||
34 | <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2> | |
35 | ||
36 | <p>This specification describes the attributes and extensions | |
37 | that CUPS adds to <a | |
4744bd90 | 38 | href="http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf"> |
ef416fc2 | 39 | Adobe TechNote #5003: PostScript Printer Description File Format |
40 | Specification Version 4.3</a>. PostScript Printer Description | |
41 | ("PPD") files describe the capabilities of each printer and are | |
42 | used by CUPS to support printer-specific features and intelligent | |
43 | filtering.</p> | |
44 | ||
45 | <h2 class='title'><a name='SYNTAX'>PPD File Syntax</a></h2> | |
46 | ||
47 | <p>The PPD format is text-based and uses lines of up to 255 | |
48 | characters terminated by a carriage return, linefeed, or | |
49 | combination of carriage return and line feed. The following ABNF | |
50 | definition [RFC2234] defines the general format of lines in a PPD | |
51 | file:</p> | |
52 | ||
53 | <pre class='command'> | |
54 | PPD-FILE = HEADER +(DATA / COMMENT / LINE-END) | |
55 | ||
56 | HEADER = "*" 0x50.50.44.2D.41.64.6F.62.65 ":" ; *PPD-Adobe: | |
57 | *WSP DQUOTE "4.3" DQUOTE LINE-END | |
58 | ||
59 | COMMENT = "*%" *TCHAR LINE-END | |
60 | ||
61 | DATA = "*" 1*KCHAR [ WSP 1*KCHAR [ "/" 1*TCHAR ] ] ":" | |
62 | 1*(*WSP VALUE) LINE-END | |
63 | ||
64 | VALUE = 1*TCHAR / DQUOTE 1*SCHAR DQUOTE | |
65 | ||
66 | KCHAR = ALPHA / DIGIT / "_" / "." / "-" | |
67 | ||
68 | SCHAR = LINE-END / WSP / %x21 / %x23-7E / %xA0-FF | |
69 | ||
70 | TCHAR = %x20-7E / %xA0-FF | |
71 | ||
72 | LINE-END = CR / LF / CR LF | |
73 | </pre> | |
74 | ||
75 | ||
76 | <h2 class='title'><a name='ATTRIBUTES'>General Attributes</a></h2> | |
77 | ||
4744bd90 | 78 | <h3>APBookFile</h3> |
79 | ||
80 | <p class='summary'>*APBookFile: "file URL"</p> | |
81 | ||
82 | <p>This string attribute specifies the Apple help book file to use | |
83 | for this printer driver.</p> | |
84 | ||
85 | <p>Example:</p> | |
86 | ||
87 | <pre class='command'> | |
88 | *APBookFile: "file:///Library/Printers/vendor/Help/filename" | |
89 | </pre> | |
90 | ||
a4d04587 | 91 | <h3>APDuplexRequiresFlippedMargin</h3> |
92 | ||
93 | <p class='summary'>*APDuplexRequiresFlippedMargin: boolean</p> | |
94 | ||
95 | <p>This boolean attribute notifies the RIP filters that the | |
96 | destination printer does not require the top and bottom margins | |
97 | of the <tt>ImageableArea</tt> swapped for the back page. The | |
98 | default value is <code>true</code>.</p> | |
ef416fc2 | 99 | |
a4d04587 | 100 | <p>Example:</p> |
ef416fc2 | 101 | |
102 | <pre class='command'> | |
a4d04587 | 103 | <em>*% Don't swap the top and bottom margins for the back side</em> |
104 | *APDuplexRequiresFlippedMargin: false | |
ef416fc2 | 105 | </pre> |
106 | ||
a4d04587 | 107 | <p>Also see the related <tt>cupsFlipDuplex</tt> attribute.</p> |
108 | ||
109 | <h3>cupsFilter</h3> | |
110 | ||
111 | <p class='summary'>*cupsFilter: "source/type cost program"</p> | |
112 | ||
113 | <p>This string attribute provides a conversion rule from the | |
114 | given source type to the printer's native format using the | |
115 | filter "program". If a printer supports the source type directly, | |
116 | the special filter program "-" may be specified.</p> | |
ef416fc2 | 117 | |
118 | <p>Examples:</p> | |
119 | ||
120 | <pre class='command'> | |
121 | <em>*% Standard raster printer driver filter</em> | |
122 | *cupsFilter: "application/vnd.cups-raster 100 rastertofoo" | |
123 | ||
124 | <em>*% Plain text filter</em> | |
125 | *cupsFilter: "text/plain 10 texttofoo" | |
126 | ||
127 | <em>*% Pass-through filter for PostScript printers</em> | |
128 | *cupsFilter: "application/vnd.cups-postscript 0 -" | |
129 | </pre> | |
130 | ||
131 | <h3>cupsFlipDuplex</h3> | |
132 | ||
a4d04587 | 133 | <p class='summary'>*cupsFlipDuplex: boolean</p> |
134 | ||
ef416fc2 | 135 | <p>This boolean attribute notifies the RIP filters that the |
136 | destination printer requires an upside-down image for the back | |
a4d04587 | 137 | page. The default value is <code>false</code>.</p> |
ef416fc2 | 138 | |
139 | <p>Example:</p> | |
140 | ||
141 | <pre class='command'> | |
142 | <em>*% Flip the page image for the back side of duplexed output</em> | |
143 | *cupsFlipDuplex: true | |
144 | </pre> | |
145 | ||
a4d04587 | 146 | <p>Also see the related <tt>APDuplexRequiresFlippedMargins</tt> attribute.</p> |
147 | ||
4744bd90 | 148 | <h3>cupsIPPReason</h3> |
149 | ||
150 | <p class='summary'>*cupsIPPReason reason/Reason Text: "optional URIs"</p> | |
151 | ||
152 | <p>This optional attribute maps custom | |
153 | <code>printer-state-reasons</code> keywords that are generated by | |
154 | the driver to human readable text. The optional URIs string | |
155 | contains zero or more URIs separated by a newline. Each URI can | |
156 | be a CUPS server absolute path to a help file under the | |
157 | scheduler's <code>DocumentRoot</code> directory, a full HTTP URL | |
158 | ("http://www.domain.com/path/to/help/page.html"), or any other | |
159 | valid URI which directs the user at additional information | |
160 | concerning the condition that is being reported.</p> | |
161 | ||
162 | <p>Examples:</p> | |
163 | ||
164 | <pre class='command'> | |
165 | <em>*% Map com.vendor-error to text but no page</em> | |
166 | *cupsIPPReason com.vendor-error/A serious error occurred: "" | |
167 | ||
168 | <em>*% Map com.vendor-error to text and a local page</em> | |
169 | *cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html" | |
170 | ||
171 | <em>*% Map com.vendor-error to text and a remote page</em> | |
172 | *cupsIPPReason com.vendor-error/A serious error occurred: "http://www.vendor.com/help" | |
173 | ||
174 | <em>*% Map com.vendor-error to text and a local, Apple help book, and remote page</em> | |
175 | *APHelpBook: "file:///Library/Printers/vendor/Help/filename" | |
176 | *cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html | |
177 | help:anchor='com.vendor-error'%20bookID=Vendor%20Help | |
178 | http://www.vendor.com/help" | |
179 | *End | |
180 | </pre> | |
181 | ||
a4d04587 | 182 | <h3>cupsLanguages</h3> |
183 | ||
184 | <p class='summary'>*cupsLanguages: "locale list"</p> | |
185 | ||
186 | <p>This attribute describes which language localizations are | |
187 | included in the PPD. The "locale list" string is a space-delimited | |
188 | list of locale names ("en", "en_US", "fr_FR", etc.)</p> | |
189 | ||
190 | <p>Example:</p> | |
191 | ||
192 | <pre class='command'> | |
193 | <em>*% Specify Canadian, UK, and US English, and Candian and French French</em> | |
194 | *cupsLanguages: "en_CA en_UK en_US fr_CA fr_FR" | |
195 | </pre> | |
196 | ||
ef416fc2 | 197 | <h3>cupsManualCopies</h3> |
198 | ||
a4d04587 | 199 | <p class='summary'>*cupsManualCopies: boolean</p> |
200 | ||
ef416fc2 | 201 | <p>This boolean attribute notifies the RIP filters that the |
202 | destination printer does not support copy generation in | |
a4d04587 | 203 | hardware. The default value is <code>false</code>.</p> |
ef416fc2 | 204 | |
205 | <p>Example:</p> | |
206 | ||
207 | <pre class='command'> | |
208 | <em>*% Tell the RIP filters to generate the copies for us</em> | |
209 | *cupsManualCopies: true | |
210 | </pre> | |
211 | ||
212 | <h3>cupsModelNumber</h3> | |
213 | ||
a4d04587 | 214 | <p class='summary'>*cupsModelNumber: number</p> |
215 | ||
ef416fc2 | 216 | <p>This integer attribute specifies a printer-specific model |
217 | number. This number can be used by a filter program to adjust | |
218 | the output for a specific model of printer.</p> | |
219 | ||
220 | <p>Example:</p> | |
221 | ||
222 | <pre class='command'> | |
223 | <em>*% Specify an integer for a driver-specific model number</em> | |
224 | *cupsModelNumber: 1234 | |
225 | </pre> | |
226 | ||
227 | <h3>cupsPortMonitor</h3> | |
228 | ||
a4d04587 | 229 | <p class='summary'>*cupsPortMonitor urischeme/Descriptive Text: "port monitor"</p> |
230 | ||
ef416fc2 | 231 | <p>This string attribute specifies printer-specific "port |
232 | monitor" filters that may be used with the printer. The CUPS | |
233 | scheduler also looks for the <tt>Protocols</tt> attribute to see | |
234 | if the <tt>BCP</tt> or <tt>TBCP</tt> protocols are supported. If | |
235 | so, the corresponding port monitor ("bcp" and "tbcp", | |
236 | respectively) is listed in the printer's | |
237 | <tt>port-monitor-supported</tt> attribute.</p> | |
238 | ||
a4d04587 | 239 | <p>The "urischeme" portion of the attribute specifies the URI scheme |
240 | that this port monitor should be used for. Typically this is used to | |
241 | pre-select a particular port monitor for each type of connection that | |
242 | is supported by the printer. The "port monitor" string can be "none" | |
243 | to disable the port monitor for the given URI scheme.</p> | |
244 | ||
ef416fc2 | 245 | <p>Examples:</p> |
246 | ||
247 | <pre class='command'> | |
248 | <em>*% Specify a PostScript printer that supports the TBCP protocol</em> | |
249 | *Protocols: TBCP PJL | |
250 | ||
a4d04587 | 251 | <em>*% Specify that TBCP should be used for socket connections but not USB</em> |
252 | *cupsPortMonitor socket/AppSocket Printing: "tbcp" | |
253 | *cupsPortMonitor usb/USB Printing: "none" | |
254 | ||
ef416fc2 | 255 | <em>*% Specify a printer-specific port monitor for an Epson USB printer</em> |
a4d04587 | 256 | *cupsPortMonitor usb/USB Status Monitor: "epson-usb" |
ef416fc2 | 257 | </pre> |
258 | ||
259 | <h3>cupsVersion</h3> | |
260 | ||
a4d04587 | 261 | <p class='summary'>*cupsVersion: major.minor</p> |
262 | ||
ef416fc2 | 263 | <p>This required attribute describes which version of the CUPS |
264 | PPD file extensions was used. Currently it must be the string | |
265 | "1.0", "1.1", or "1.2".</p> | |
266 | ||
267 | <p>Example:</p> | |
268 | ||
269 | <pre class='command'> | |
270 | <em>*% Specify a CUPS 1.2 driver</em> | |
271 | *cupsVersion: "1.2" | |
272 | </pre> | |
273 | ||
ef416fc2 | 274 | <h2 class='title'><a name='OPTIONS'>Custom Options</a></h2> |
275 | ||
276 | <p>CUPS supports custom options using an extension of the | |
277 | <tt>CustomPageSize</tt> and <tt>ParamCustomPageSize</tt> | |
278 | syntax:</p> | |
279 | ||
280 | <pre class='command'> | |
281 | *CustomFoo True: "command" | |
282 | *ParamCustomFoo Name1/Text 1: order type minimum maximum | |
283 | *ParamCustomFoo Name2/Text 2: order type minimum maximum | |
284 | ... | |
285 | *ParamCustomFoo NameN/Text N: order type minimum maximum | |
286 | </pre> | |
287 | ||
288 | <p>When the base option is part of the <tt>JCLSetup</tt> section, | |
289 | the "command" string contains JCL commands with "\order" | |
290 | placeholders for each numbered parameter. The CUPS API handles | |
a4d04587 | 291 | any necessary value quoting for HP-PJL commands. For example, if |
292 | the JCL command string is "@PJL SET PASSCODE=\1" and the first | |
293 | option value is "1234" then CUPS will output the string | |
294 | "@PJL SET PASSCODE=1234".</p> | |
ef416fc2 | 295 | |
296 | <p>For non-<tt>JCLSetup</tt> options, the "order" value is a | |
297 | number from 1 to N and specifies the order of values as they are | |
a4d04587 | 298 | placed on the stack before the command. For example, if the |
299 | PostScript command string is | |
300 | "<</cupsReal1 2 1 roll>>setpagedevice" and the | |
301 | option value is "2.0" then CUPS will output the string | |
302 | "2.0 <</cupsReal1 2 1 roll>>setpagedevice".</p> | |
ef416fc2 | 303 | |
304 | <p>The "type" is one of the following keywords:</p> | |
305 | ||
306 | <ul> | |
307 | ||
308 | <li><tt>curve</tt> - a real value from "minimum" to | |
309 | "maximum" representing a gamma correction curve using the | |
310 | function: f(x) = x <sup>value</sup></li> | |
311 | ||
312 | <li><tt>int</tt> - an integer value from "minimum" to | |
313 | "maximum"</li> | |
314 | ||
315 | <li><tt>invcurve</tt> - a real value from "minimum" to | |
316 | "maximum" representing a gamma correction curve using the | |
317 | function: f(x) = x <sup>1 / value</sup></li> | |
318 | ||
319 | <li><tt>passcode</tt> - a string of numbers value with a | |
320 | minimum of "minimum" numbers and a maximum of "maximum" | |
a4d04587 | 321 | numbers ("minimum" and "maximum" are numbers and passcode |
322 | strings are not displayed in the user interface)</li> | |
ef416fc2 | 323 | |
324 | <li><tt>password</tt> - a string value with a minimum of | |
325 | "minimum" characters and a maximum of "maximum" | |
a4d04587 | 326 | characters ("minimum" and "maximum" are numbers and password |
327 | strings are not displayed in the user interface)</li> | |
ef416fc2 | 328 | |
329 | <li><tt>points</tt> - a measurement value in points from | |
330 | "minimum" to "maximum"</li> | |
331 | ||
332 | <li><tt>real</tt> - a real value from "minimum" to | |
333 | "maximum"</li> | |
334 | ||
335 | <li><tt>string</tt> - a string value with a minimum of | |
336 | "minimum" characters and a maximum of "maximum" | |
a4d04587 | 337 | characters ("minimum" and "maximum" are numbers)</li> |
ef416fc2 | 338 | |
339 | </ul> | |
340 | ||
341 | <p>Examples:</p> | |
342 | ||
343 | <pre class='command'> | |
344 | <em>*% Base JCL key code option</em> | |
345 | *OpenUI JCLPasscode/Key Code: PickOne | |
346 | *OrderDependency: 10 JCLSetup *JCLPasscode | |
347 | *DefaultJCLPasscode: None | |
348 | *JCLPasscode None/No Code: "" | |
349 | *JCLPasscode 1111: "@PJL SET PASSCODE = 1111<0A>" | |
350 | *JCLPasscode 2222: "@PJL SET PASSCODE = 2222<0A>" | |
351 | *JCLPasscode 3333: "@PJL SET PASSCODE = 3333<0A>" | |
352 | *JCLCloseUI: *JCLPasscode | |
353 | ||
354 | <em>*% Custom JCL key code option</em> | |
355 | *CustomJCLPasscode True: "@PJL SET PASSCODE = \1<0A>" | |
356 | *ParamCustomJCLPasscode Code/Key Code: 1 passcode 4 4 | |
357 | ||
358 | ||
a4d04587 | 359 | <em>*% Base PostScript watermark option</em> |
360 | *OpenUI WatermarkText/Watermark Text: PickOne | |
361 | *OrderDependency: 10 AnySetup *WatermarkText | |
362 | *DefaultWatermarkText: None | |
363 | *WatermarkText None: "" | |
364 | *WatermarkText Draft: "<</cupsString1(Draft)>>setpagedevice" | |
365 | *CloseUI: *WatermarkText | |
366 | ||
367 | <em>*% Custom PostScript watermark option</em> | |
368 | *CustomWatermarkText True: "<</cupsString1 2 1 roll>>setpagedevice" | |
369 | *ParamCustomWatermarkText Text: 1 string 0 32 | |
370 | ||
371 | ||
ef416fc2 | 372 | <em>*% Base PostScript gamma/density option</em> |
373 | *OpenUI GammaDensity/Gamma and Density: PickOne | |
374 | *OrderDependency: 10 AnySetup *GammaDensity | |
375 | *DefaultGammaDensity: Normal | |
376 | *GammaDensity Normal/Normal: "<</cupsReal1 1.0/cupsReal2 1.0>>setpagedevice" | |
377 | *GammaDensity Light/Lighter: "<</cupsReal1 0.9/cupsReal2 0.67>>setpagedevice" | |
378 | *GammaDensity Dark/Darker: "<</cupsReal1 1.1/cupsReal2 1.5>>setpagedevice" | |
a4d04587 | 379 | *CloseUI: *GammaDensity |
ef416fc2 | 380 | |
381 | <em>*% Custom PostScript gamma/density option</em> | |
382 | *CustomGammaDensity True: "<</cupsReal1 3 1 roll/cupsReal2 3 1>>setpagedevice" | |
383 | *ParamCustomGammaDensity Gamma: 1 curve 0.1 10 | |
384 | *ParamCustomGammaDensity Density: 2 real 0 2 | |
385 | </pre> | |
386 | ||
387 | ||
388 | <h2 class='title'><a name='PROFILES'>Color Profiles</a></h2> | |
389 | ||
a4d04587 | 390 | <p>CUPS supports two types of color profiles. The first type is |
391 | based on sRGB and is used by the standard CUPS raster filters and | |
392 | ESP Ghostscript. The second type is based on ICC profiles and is | |
393 | used by the Core Graphics-based filters on MacOS X.</p> | |
394 | ||
395 | <blockquote><b>Note:</b> At this time, none of the CUPS raster | |
396 | filters support ICC profiles. This will be addressed as time | |
397 | and resources permit.</blockquote> | |
398 | ||
ef416fc2 | 399 | <h3>cupsColorProfile</h3> |
400 | ||
a4d04587 | 401 | <p class='summary'>*cupsColorProfile Resolution/MediaType: "density |
402 | gamma m00 m01 m02 m10 m11 m12 m20 m21 m22"</p> | |
ef416fc2 | 403 | |
a4d04587 | 404 | <p>This string attribute specifies an sRGB-based color profile |
405 | consisting of gamma and density controls and a 3x3 CMY color | |
406 | transform matrix.</p> | |
ef416fc2 | 407 | |
408 | <p>The <i>Resolution</i> and <i>MediaType</i> values may be "-" | |
409 | to act as a wildcard. Otherwise they must match one of the | |
410 | <tt>Resolution</tt> or <tt>MediaType</tt> attributes defined in | |
411 | the PPD file.</p> | |
412 | ||
413 | <p>The <i>density</i> and <i>gamma</i> values define gamma and | |
414 | density adjustment function such that:</p> | |
415 | ||
416 | <pre class='command'> | |
417 | f(x) = density * x <sup style='font-size: 100%'>gamma</sup> | |
418 | </pre> | |
419 | ||
420 | <p>The <i>m00</i> through <i>m22</i> values define a 3x3 | |
421 | transformation matrix for the CMY color values. The density | |
422 | function is applied <i>after</i> the CMY transformation:</p> | |
423 | ||
424 | <pre class='command'> | |
425 | | m00 m01 m02 | | |
426 | | m10 m11 m12 | | |
427 | | m20 m21 m22 | | |
428 | </pre> | |
429 | ||
430 | <p>Examples:</p> | |
431 | ||
432 | <pre class='command'> | |
433 | <em>*% Specify a profile for printing at 360dpi on all media types</em> | |
434 | *cupsColorProfile 360dpi/-: "1.0 1.5 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0" | |
435 | ||
436 | <em>*% Specify a profile for printing at 720dpi on Glossy media</em> | |
437 | *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" | |
438 | ||
439 | <em>*% Specify a default profile for printing at all other resolutions and media types</em> | |
440 | *cupsColorProfile -/-: "0.9 2.0 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0" | |
441 | </pre> | |
442 | ||
443 | <h3>cupsICCProfile</h3> | |
444 | ||
a4d04587 | 445 | <p class='summary'>*cupsICCProfile |
446 | ColorModel.MediaType.Resolution/Description: "filename"</p> | |
ef416fc2 | 447 | |
a4d04587 | 448 | <p>This attribute specifies an ICC color profile that is |
449 | used to convert the document colors to the device | |
450 | colorspace. The <tt>ColorModel</tt>, <tt>MediaType</tt>, and | |
ef416fc2 | 451 | <tt>Resolution</tt> keywords specify a selector for color |
452 | profiles. If omitted, the color profile will match any option | |
453 | keyword for the corresponding main keyword.</p> | |
454 | ||
455 | <p>The <tt>Description</tt> specifies human-readable text that | |
456 | is associated with the color profile. The <tt>filename</tt> | |
457 | portion specifies the ICC color profile to use; if the filename | |
458 | is not absolute, it is loaded relative to the | |
459 | <var>/usr/share/cups/profiles</var> directory.</p> | |
460 | ||
461 | <p>Examples:</p> | |
462 | ||
463 | <pre class='command'> | |
464 | <em>*% Specify a profile for CMYK printing at 360dpi on all media types</em> | |
465 | *cupsICCProfile CMYK..360dpi/360dpi CMYK: "vendor/foo-360-cmyk.icc" | |
466 | ||
467 | <em>*% Specify a profile for RGB printing at 720dpi on Glossy media</em> | |
468 | *cupsColorProfile RGB.Glossy.720dpi/720dpi Glossy: "vendor/foo-720-glossy-rgb.icc" | |
469 | ||
470 | <em>*% Specify a default profile for printing at all other resolutions and media types</em> | |
fa73b229 | 471 | *cupsICCProfile ../Default: "vendor/foo-default.icc" |
ef416fc2 | 472 | </pre> |
473 | ||
474 | <h4>Customizing the Profile Selection Keywords</h4> | |
475 | ||
a9252913 | 476 | <p>The <tt>MediaType</tt> and <tt>Resolution</tt> keywords can be |
477 | reassigned to different main keywords, allowing drivers to do | |
478 | color profile selection based on different parameters. The | |
479 | <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> | |
ef416fc2 | 480 | attributes define the mapping from selector to main keyword:</p> |
481 | ||
482 | <pre class='command'> | |
a9252913 | 483 | *cupsICCQualifier2: MainKeyword2 |
484 | *cupsICCQualifier3: MainKeyword3 | |
ef416fc2 | 485 | </pre> |
486 | ||
487 | <p>The default mapping is as follows:</p> | |
488 | ||
489 | <pre class='command'> | |
ef416fc2 | 490 | *cupsICCQualifier2: MediaType |
491 | *cupsICCQualifier3: Resolution | |
492 | </pre> | |
493 | ||
494 | ||
ecdc0628 | 495 | <h2 class='title'><a name='I18N'>Globalized PPD Support</a></h2> |
ef416fc2 | 496 | |
497 | <p>CUPS 1.2 and higher adds support for PPD files containing multiple | |
a4d04587 | 498 | languages by following the following additional rules:</p> |
ef416fc2 | 499 | |
500 | <ol> | |
501 | ||
a4d04587 | 502 | <li>The <tt>LanguageVersion</tt> MUST be <tt>English</tt></li> |
503 | ||
504 | <li>The <tt>LanguageEncoding</tt> MUST be <tt>ISOLatin1</tt></li> | |
505 | ||
506 | <li>The <tt>cupsLanguages</tt> attribute MUST be provided and | |
507 | list each of the supported locales in the PPD file</li> | |
508 | ||
509 | <li>Main and option keywords MUST NOT exceed 34 (instead of 40) | |
510 | characters to allow room for the locale prefixes in translation | |
511 | attributes</li> | |
ef416fc2 | 512 | |
a4d04587 | 513 | <li>The main keyword "Translation" MUST NOT be used</li> |
ef416fc2 | 514 | |
a4d04587 | 515 | <li>Translation strings included with the main and option |
516 | keywords MUST NOT contain characters outside the ASCII | |
517 | subset of ISOLatin1 and UTF-8; developers wishing to use | |
518 | characters outside ASCII MUST provide a separate set of | |
519 | English localization attributes for the affected keywords.</li> | |
ef416fc2 | 520 | |
a4d04587 | 521 | <li>Localizations are specified using a locale prefix of |
ef416fc2 | 522 | the form "ll" or "ll_CC." where "ll" is the 2-letter ISO |
523 | language code and "CC" is the 2-letter ISO country | |
524 | code</li> | |
525 | ||
a4d04587 | 526 | <li>Locale-specific translation strings MUST be encoded |
527 | using UTF-8.</li> | |
ef416fc2 | 528 | |
a4d04587 | 529 | <li>Main keywords MUST be localized using one of the |
ef416fc2 | 530 | following forms: |
531 | <p><tt>*ll.Translation MainKeyword/translation | |
532 | text: ""</tt><br /> | |
533 | <tt>*ll_CC.Translation MainKeyword/translation | |
534 | text: ""</tt></p></li> | |
535 | ||
a4d04587 | 536 | <li>Option keywords MUST be localized using one of the |
ef416fc2 | 537 | following forms: |
538 | <p><tt>*ll.MainKeyword OptionKeyword/translation | |
539 | text: ""</tt><br /> | |
540 | <tt>*ll_CC.MainKeyword OptionKeyword/translation | |
541 | text: ""</tt></p></li> | |
542 | ||
a4d04587 | 543 | <li>Localization attributes MAY appear anywhere after the |
544 | first line of the PPD file</li> | |
545 | ||
ef416fc2 | 546 | </ol> |
547 | ||
a4d04587 | 548 | <blockquote><b>Note:</b> |
549 | We use a <tt>LanguageEncoding</tt> value of <tt>ISOLatin1</tt> | |
550 | and limit the allowed base translation strings to ASCII to avoid | |
551 | character coding issues that would otherwise occur. In addition, | |
552 | requiring the base translation strings to be in English allows | |
553 | for easier fallback translation when no localization is provided | |
554 | in the PPD file for a given locale.</blockquote> | |
ef416fc2 | 555 | |
a4d04587 | 556 | <p>Examples:</p> |
ef416fc2 | 557 | |
558 | <pre class='command'> | |
559 | *LanguageVersion: English | |
560 | *LanguageEncoding: ISOLatin1 | |
a4d04587 | 561 | *cupsLanguages: "de_DE fr_FR" |
ef416fc2 | 562 | *ModelName: "Foobar Laser 9999" |
563 | ||
a4d04587 | 564 | <em>*% Localize ModelName for French and German</em> |
ef416fc2 | 565 | *fr_FR.Translation ModelName/La Foobar Laser 9999: "" |
566 | *de_DE.Translation ModelName/Foobar LaserDrucken 9999: "" | |
567 | ||
4744bd90 | 568 | *cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html" |
b423cd4c | 569 | <em>*% Localize printer-state-reason for French and German</em> |
4744bd90 | 570 | *fr_FR.cupsIPPReason com.vendor-error/Une erreur sèrieuse s'est produite: "/help/com.vendor/error.html" |
571 | *de_DE.cupsIPPReason com.vendor-error/Eine ernste Störung trat: "/help/com.vendor/error.html" | |
b423cd4c | 572 | |
ef416fc2 | 573 | ... |
574 | ||
575 | *OpenUI *InputSlot/Paper Source: PickOne | |
576 | *OrderDependency: 10 AnySetup *InputSlot | |
577 | *DefaultInputSlot: Auto | |
a4d04587 | 578 | <em>*% Localize InputSlot for French and German</em> |
ef416fc2 | 579 | *fr_FR.Translation InputSlot/Papier source: "" |
580 | *de_DE.Translation InputSlot/Papiereinzug: "" | |
581 | *InputSlot Auto/Default: "<</ManualFeed false>>setpagedevice" | |
a4d04587 | 582 | <em>*% Localize InputSlot=Auto for French and German</em> |
ef416fc2 | 583 | *fr_FR.InputSlot Auto/Par Defaut: "" |
584 | *de_DE.InputSlot Auto/Standard: "" | |
585 | *InputSlot Manual/Manual Feed: "<</ManualFeed true>>setpagedevice" | |
a4d04587 | 586 | <em>*% Localize InputSlot=Manual for French and German</em> |
ef416fc2 | 587 | *fr_FR.InputSlot Manual/Manuel mecanisme de alimentation: "" |
588 | *de_DE.InputSlot Manual/Manueller Einzug: "" | |
589 | *CloseUI: *InputSlot | |
590 | </pre> | |
591 | ||
592 | ||
593 | <h2 class='title'><a name='HISTORY'>Change History</a></h2> | |
594 | ||
595 | <h3>Changes in CUPS 1.2</h3> | |
596 | ||
597 | <ul> | |
598 | ||
ecdc0628 | 599 | <li>Added globalization support attributes</li> |
ef416fc2 | 600 | |
601 | <li>Added custom option values support</li> | |
602 | ||
4744bd90 | 603 | <li>Added <tt>APBookFile</tt> attribute</li> |
604 | ||
a4d04587 | 605 | <li>Added <tt>APDuplexRequiresFlippedMargin</tt> attribute</li> |
606 | ||
ef416fc2 | 607 | <li>Added <tt>cupsICCProfile</tt> attribute</li> |
608 | ||
4744bd90 | 609 | <li>Added <tt>cupsIPPReason</tt> attribute</li> |
610 | ||
a4d04587 | 611 | <li>Added <tt>cupsLanguages</tt> attribute</li> |
612 | ||
ef416fc2 | 613 | <li>Added <tt>cupsPortMonitor</tt> attribute</li> |
614 | ||
615 | <li>Removed <tt>cupsProtocol</tt> attribute</li> | |
616 | ||
617 | </ul> | |
618 | ||
619 | <h3>Changes in CUPS 1.1</h3> | |
620 | ||
621 | <ul> | |
622 | ||
623 | <li>Added <tt>cupsFlipDuplex</tt> attribute</li> | |
624 | ||
625 | <li>Added <tt>cupsProtocol</tt> attribute</li> | |
626 | ||
627 | </ul> | |
628 | ||
629 | </body> | |
630 | </html> |