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