3 <title>CUPS PostScript Printer Description (PPD) File Specification</title>
4 <meta name='COPYRIGHT' content='Copyright 2004, All Rights Reserved'/>
5 <meta name='DOCNUMBER' content='CUPS-PPD-1.2'/>
6 <meta name='Auther' content='Easy Software Products'/>
13 <h2>Identification</h2>
15 <p>This document describes the PostScript Printer Description
16 (PPD) file format and the supported extensions for the Common
17 UNIX Printing System ("CUPS") Version 1.2. It should be used in
18 conjunction with the Adobe PostScript Printer Description File
19 Format Specification, Version 4.3 when creating PPD files for
22 <embed src="system-overview.shtml"/>
24 <h2>Document Overview</h2>
26 <p>This CUPS PostScript Printer Description File Specification
27 document is organized into the following sections:</p>
33 <li>2 - References</li>
35 <li>3 - PPD File Syntax</li>
37 <li>4 - General Attributes</li>
39 <li>5 - Custom Options</li>
41 <li>6 - Color Profiles</li>
43 <li>7 - I18N Support</li>
47 <li>B - Change History</li>
51 <embed src="references.shtml"/>
53 <h1>PPD File Syntax</h1>
55 <p>PostScript Printer Description ("PPD") files describe the
56 capabilities of each printer and are used by CUPS to support
57 printer-specific features and intelligent filtering.</p>
59 <p>The PPD file format is described in <a
60 href="http://partners.adobe.com/asn/developer/PDFS/TN/5003.PPD_Spec_v4.3.pdf">
61 Adobe TechNote #5003: PostScript Printer Description File Format
62 Specification Version 4.3</a>.</p>
64 <p>The format is text-based and uses lines of up to 255
65 characters terminated by a carriage return, linefeed, or
66 combination of carriage return and line feed. The following ABNF
67 definition [RFC2234] defines the general format of lines in a
71 PPD-FILE = HEADER +(DATA / COMMENT / LINE-END)
73 HEADER = "*" 0x50.50.44.2D.41.64.6F.62.65 ":" ; *PPD-Adobe:
74 *WSP DQUOTE "4.3" DQUOTE LINE-END
76 COMMENT = "*%" *TCHAR LINE-END
78 DATA = "*" 1*KCHAR [ WSP 1*KCHAR [ "/" 1*TCHAR ] ] ":"
79 1*(*WSP VALUE) LINE-END
81 VALUE = 1*TCHAR / DQUOTE 1*SCHAR DQUOTE
83 KCHAR = ALPHA / DIGIT / "_" / "." / "-"
85 SCHAR = LINE-END / WSP / %x21 / %x23-7E / %xA0-FF
87 TCHAR = %x20-7E / %xA0-FF
89 LINE-END = CR / LF / CR LF
93 <h1>General Attributes</h1>
97 <p>This string attribute provides a conversion rule of the
101 source/type cost program
104 <p>The destination type is assumed to the printer's type. If a
105 printer supports the source type directly the special filter
106 program "-" may be specified.</p>
108 <h2>cupsFlipDuplex</h2>
110 <p>This boolean attribute notifies the RIP filters that the
111 destination printer requires an upside-down image for the back
112 page. The default value is false.</p>
114 <h2>cupsManualCopies</h2>
116 <p>This boolean attribute notifies the RIP filters that the
117 destination printer does not support copy generation in
118 hardware. The default value is false.</p>
120 <h2>cupsModelNumber</h2>
122 <p>This integer attribute specifies a printer-specific model
123 number. This number can be used by a filter program to adjust
124 the output for a specific model of printer.</p>
126 <h2>cupsProtocol</h2>
128 <p>This optional attribute describes which binary communication
129 protocol to use when printing binary PostScript data. The
130 strings "None", "BCP", and "TBCP" are recognized, corresponding
131 to no encoding, BCP, and TBCP respectively.</p>
135 <p>This required attribute describes which version of the CUPS
136 IDD was used for the PPD file extensions. Currently it must be
137 the string "1.0", "1.1", or "1.2".</p>
140 <h1>Custom Options</h1>
143 <h1>Color Profiles</h1>
145 <h4>cupsColorProfile</h4>
147 <p>This string attribute specifies a color profile of the
151 *cupsColorProfile Resolution/MediaType: "density gamma m00 m01 m02 m10 m11 m12 m20 m21 m22"
154 <p>The <i>Resolution</i> and <i>MediaType</i> values may be "-"
155 to act as a wildcard. Otherwise they must match one of the
156 <tt>Resolution</tt> or <tt>MediaType</tt> attributes defined in
159 <p>The <i>density</i> and <i>gamma</i> values define gamma and
160 density adjustment function such that:</p>
163 f(x) = density * x<SUp>gamma</SUp>
166 <p>The <i>m00</i> through <i>m22</i> values define a 3x3
167 transformation matrix for the CMY color values. The density
168 function is applied <i>after</i> the CMY transformation:</p>
176 <h2>cupsICCProfile</h2>
178 <p>This attribute specifies an ICC color profile of the
182 *cupsICCProfile ColorModel.MediaType.Resolution/Description: "filename"
185 <p>The <tt>ColorModel</tt>, <tt>MediaType</tt>, and
186 <tt>Resolution</tt> keywords specify a selector for color
187 profiles. If omitted, the color profile will match any option
188 keyword for the corresponding main keyword.</p>
190 <p>The <tt>Description</tt> specifies human-readable text that
191 is associated with the color profile. The <tt>filename</tt>
192 portion specifies the ICC color profile to use; if the filename
193 is not absolute, it is loaded relative to the
194 <var>/usr/share/cups/profiles</var> directory.</p>
196 <h3>Customizing the Profile Selection Keywords</h3>
198 <p>The <tt>ColorModel</tt>, <tt>MediaType</tt>, and
199 <tt>Resolution</tt> keywords can be reassigned to different main
200 keywords, allowing drivers to do color profile selection based
201 on different parameters. The <tt>cupsICCQualifier1</tt>,
202 <tt>cupsICCQualifier2</tt>, and <tt>cupsICCQualifier3</tt>
203 attributes define the mapping from selector to main keyword:</p>
206 *cupsICCQualifier1: MainKeyword
207 *cupsICCQualifier2: MainKeyword
208 *cupsICCQualifier3: MainKeyword
211 <p>The default mapping is as follows:</p>
214 *cupsICCQualifier1: ColorModel
215 *cupsICCQualifier2: MediaType
216 *cupsICCQualifier3: Resolution
219 <h1><a name'I18N'>I18N Support</a></h1>
221 <p>CUPS 1.2 and higher adds support for PPD files containing multiple
222 languages by following the following rules:</p>
226 <li>The <tt>LanguageVersion</tt> is <tt>English</tt></li>
228 <li>The <tt>LanguageEncoding</tt> is <tt>ISOLatin1</tt></li>
230 <li>Main and option keywords may not exceed 34
231 characters, which is a subset of what the Adobe PPD spec
234 <li>Translations are specified using a locale prefix of
235 the form "ll" or "ll_CC." where "ll" is the 2-letter ISO
236 language code and "CC" is the 2-letter ISO country
239 <li>Translation strings are encoded using UTF-8.</li>
241 <li>Main keywords are translated using any of the
243 <p><tt>*ll.Translation MainKeyword/translation
245 <tt>*ll_CC.Translation MainKeyword/translation
246 text: ""</tt></p></li>
248 <li>Option keywords are translated using any of the
250 <p><tt>*ll.MainKeyword OptionKeyword/translation
252 <tt>*ll_CC.MainKeyword OptionKeyword/translation
253 text: ""</tt></p></li>
257 <p>The following example shows how a fictional Foobar Laser 9999
258 PPD file would be localized for English, French, and German:</p>
261 *LanguageVersion: English
262 *LanguageEncoding: ISOLatin1
263 *ModelName: "Foobar Laser 9999"
264 *fr_FR.Translation ModelName/La Foobar Laser 9999: ""
265 *de_DE.Translation ModelName/Foobar LaserDrucken 9999: ""
267 *OpenUI *InputSlot/Paper Source: PickOne
268 *OrderDependency: 10 AnySetup *InputSlot
269 *DefaultInputSlot: Auto
270 *fr_FR.Translation InputSlot/Papier source: ""
271 *de_DE.Translation InputSlot/Papiereinzug: ""
272 *InputSlot Auto/Default: "<</ManualFeed false>>setpagedevice"
273 *fr_FR.InputSlot Auto/Par Defaut: ""
274 *de_DE.InputSlot Auto/Standard: ""
275 *InputSlot Manual/Manual Feed: "<</ManualFeed true>>setpagedevice"
276 *fr_FR.InputSlot Manual/Manuel mecanisme de alimentation: ""
277 *de_DE.InputSlot Manual/Manueller Einzug: ""
281 <embed src="glossary.shtml"/>
283 <h1>Change History</h1>
285 <h2>Changes in CUPS 1.2</h2>
289 <li><tt>cupsICCProfile</tt></li>
291 <li>New I18N support</li>
309 <h2>Changes in CUPS 1.1</h2>
313 <li><tt>cupsProtocol</tt></li>
315 <li><tt>cupsFlipDuplex</tt></li>