2 // PPD file compiler test data file for CUPS.
4 // Copyright © 2007-2011 by Apple Inc.
5 // Copyright © 1997-2003 by Easy Software Products.
7 // Licensed under Apache License v2.0. See the file "LICENSE" for more
12 * C-style comments are supported.
16 // C++-style comments are supported.
20 // Include the common media size definitions...
22 // #include directives support both <name> to include a standard file
23 // and "name" or just name without the quotes for a local file. Local
24 // files resolve relative to the current file's path. Unlike C/C++,
25 // #include <name> does not look in multiple directories, and
26 // #include "name" does not look in the standard directory.
33 // Include the CUPS raster definitions...
36 #include <raster.defs>
40 // Include the standard CUPS fonts...
47 // Define variables using the #define directive. In this case we
48 // are defining constants for the model number, which is used by
49 // our imaginary rastertofoo filter to determine which model-specific
50 // features to use/support.
61 // Media sizes are defined using the #media directive. The order of
62 // values is: size name/text, width, length.
64 // "Size name" is an alphanumeric string of up to 40 characters as
65 // defined by the Adobe PPD specification.
67 // "Size text" is a text string of up to 80 characters as defined by
68 // the Adobe PPD specification.
70 // "Width" and "length" are the width and length of the media size.
71 // Numbers by themselves represent points (72 points = 1 inch). The
72 // suffixes "cm", "ft", "in", "m", "mm", and "pt" are recognized to
73 // specify centimeters, feet, inches, meters, millimeters, and points,
77 #media "FooLetter/Foo Letter" 8in 10in
78 #media "FooPhoto/Foo Photo" 200mm 300mm
82 // Message catalogs can be included using #po...
89 // Specify that the drivers use all of the standard base fonts...
96 // All copyright lines are put at the top of the PPD file in order
97 // of their appearance. Copyright text can span multiple lines and
98 // will be properly included in the PPD file with comment prefixes
101 // First an MIT-style copyright/license notice...
104 Copyright "Copyright 2007 by Foo Industries."
106 Permission is granted for redistribution of this file as long as
107 this copyright notice is intact and the contents of the file are
108 not altered in any way from their original form.
110 Permission is hereby granted, free of charge, to any person
111 obtaining a copy of this software and associated documentation
112 files (the \"Software\"), to deal in the Software without
113 restriction, including without limitation the rights to use,
114 copy, modify, merge, publish, distribute, sublicense, and/or
115 sell copies of the Software, and to permit persons to whom the
116 Software is furnished to do so, subject to the following
119 The above copyright notice and this permission notice shall be
120 included in all copies or substantial portions of the Software.
122 THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,
123 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
124 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
125 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
126 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
127 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
128 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
129 OTHER DEALINGS IN THE SOFTWARE.
133 // Then a GPL notice...
136 Copyright "Copyright 2007 by Foo Industries."
138 This software is free software; you can redistribute it and/or
139 modify it under the terms of the GNU General Public License as
140 published by the Free Software Foundation; either version 2 of
141 the License, or (at your option) any later version.
143 This software is distributed in the hope that it will be useful,
144 but WITHOUT ANY WARRANTY; without even the implied warranty of
145 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
146 GNU General Public License for more details.
148 You should have received a copy of the GNU General Public
149 License along with this software; if not, write to the Free
150 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
156 // All printer drivers must define the manufacturer, model, PC
157 // filename, and version strings; since this test file contains
158 // drivers for an imaginary manufacturer "Foo", all of the drivers
159 // listed in this file share common manufacturer and version
168 // Printer drivers can access driver-specific attributes in a PPD
169 // file; these attributes are specified using lines of the form:
171 // Attribute name selector value
173 // "Name" is the name of the attribute and should start with either
174 // the "cups" prefix or the name of the vendor, e.g. "hpFoo",
175 // "epsonBar", etc. The name can be any alphanumeric character (a-z,
176 // A-Z, and 0-9) and cannot be a common prefix of another attribute,
177 // e.g. "fooLines" and "fooLinesPerInch" cannot be in the same file.
179 // "Selector" is a selector string containing any characters except
180 // colon (:). Typically this will be one or more keywords separated
181 // by the forward slash (/), however the empty string ("") can be used
182 // to omit the selector.
184 // "Value" is a quoted value string that can contain any printable
185 // characters except the double quote ("). Hexadecimal numbers
186 // inside angle brackets (<xx>) can be used to substitute escape
187 // codes and other special characters.
190 Attribute fooOutputFormat "" "PCL"
191 Attribute fooPJL Begin "<1B>%-12345X@PJL<0D0A>"
192 Attribute fooPJL Enter/PCL "@PJL ENTER LANGUAGE=PCL<0D0A>"
193 Attribute fooPJL End "<1B>%-12345X@PJL END JOB<0D0A>"
196 // Most printer drivers use filters; exceptions include PostScript
197 // printers and PPD files for software RIPs.
201 // Filter mime-type cost program
203 // The "mime-type" field defines the MIME type that the filter program
204 // accepts; for CUPS raster printer drivers, this will be
205 // "application/vnd.cups-raster".
207 // The "cost" field defines the relative cost of the filter in terms of
208 // both CPU and memory usage, and is used to limit the number of
209 // simultaneous jobs in some configurations. Most raster filters should
210 // have a cost of 100, unless the filter does no dithering - then a cost
211 // of 33 is more appropriate.
213 // The "program" field defined the filter program to run; use the null
214 // filter "-" to define a MIME type that the printer accepts directly.
215 // If no path information is provided, then the program will be run
216 // from the standard CUPS filter directory, usually
217 // /usr/lib/cups/filter.
219 // When compiling PPD files for PostScript capable devices that use
220 // additional filters, add a null filter for the MIME type
221 // "application/vnd.cups-postscript" so that printer commands, user
222 // job filters, and page markings can be added to the PostScript
223 // output that is sent to the printer.
226 Filter application/vnd.cups-raster 100 rastertofoo
230 // Attributes are included thusly...
233 Attribute cupsIPPReason "com.foo-serious-error/A Serious Error" "http://foo.com/serious.html"
237 // Curley braces are used for grouping common data and for isolating
238 // individual printer models. All data values are inherited *except*
239 // for the PCFilename and ModelName strings.
244 // Define two printer drivers that support only the FooLetter and
245 // FooPhoto media size. One is color, the other is black-and-white.
247 // Both printers share two MediaSize definitions; the name listed
248 // after the MediaSize keyword must be one of the Adobe standard
249 // names listed in the PPD specification or any named size defined
250 // using the #media directive.
252 // Default options are indicated by placing an asterisk (*) before
255 // For custom size and margin specification, see the next group of
264 // These imaginary printers support printing at 300, 600x300,
265 // and 600 DPI. We'll use the old-style Resolution convenience
266 // keyword which accepts the following parameters: colorspace/
267 // order, bits-per-color, row count, row feed, row step, and
270 // The name must be of the form NNNsuffix or NNNxMMMsuffix,
271 // where NNN and MMM represent the X and Y resolution in dots
275 Resolution - 8 0 0 0 "300dpi/300 DPI"
276 Resolution - 8 0 0 0 "600x300dpi/600 x 300 DPI"
277 *Resolution - 8 0 0 0 "600dpi/600 DPI"
281 // One printer is grayscale only, and the other does grayscale
282 // and color. Define the grayscale color model for both printers
283 // using the old-style ColorModel convenience keyword which
284 // accepts the name/text, colorspace, color order, and compression
288 ColorModel Gray/Grayscale w chunked 0
293 // The first sub-group contains the grayscale printer, which
294 // only needs the model name, PC filename, and model number
297 // The ModelName keyword defines the string that is shown to
301 ModelName "Mono Photo Printer"
305 // The ModelNumber keyword defines the cupsModelNumber
306 // attribute value. We use the "(name name)" notation
307 // to perform a bitwise OR of the #define'd constants.
310 ModelNumber ($MODEL_BW $MODEL_PHOTO)
314 // The PCFileName keyword defines the filename of the PPD
315 // file and should be 8 characters or less + the .ppd
319 PCFileName "foogphot.ppd"
325 // The second sub-group contains the color printer, which
326 // needs another ColorModel definition along with the model
327 // name, PC filename, and model number values. For fun, we'll
328 // add some input slots (paper trays) as well.
330 // The ModelName keyword defines the string that is shown to
334 ModelName "Color Photo Printer"
338 // The ModelNumber keyword defines the cupsModelNumber
339 // attribute value. We use the "(name name)" notation
340 // to perform a bitwise OR of the #define'd constants.
343 ModelNumber ($MODEL_COLOR $MODEL_PHOTO)
347 // The PCFileName keyword defines the filename of the PPD
348 // file and should be 8 characters or less + the .ppd
352 PCFileName "foocphot.ppd"
356 // This printer does color printing, too, so add it and make
357 // RGB the default...
362 *ColorModel RGB/Color rgb chunked 0
366 // The old-style InputSlot keyword accepts tray definitions
369 // InputSlot position name/text
372 InputSlot 0 "Upper/Main Paper Tray"
373 InputSlot 1 "LargeCapacity/Large Paper Tray"
380 // Define two printer drivers that support two typical laser
381 // printers with custom page sizes. One is color, the other is
384 // Both printers share several MediaSize definitions and support
385 // custom page sizes from 3x5 to 13x19 inches.
387 // All US media sizes use hardware margins of 0.25 inches on the sides
388 // and 12 points (1/6th inch) at the top and bottom. European sizes
389 // and custom sizes use margins of 12 points all around.
391 // The order of the HWMargins numbers are left, bottom, right, and top.
392 // The current HWMargins values are used when defining each media size.
393 // The last HWMargins values are used for custom page size margins.
396 HWMargins 0.25in 12pt 0.25in 12pt
401 MediaSize TabloidExtra
403 HWMargins 12pt 12pt 12pt 12pt
408 // Specify that custom/variable paper sizes are supported, and the
409 // range of sizes that are supported...
412 VariablePaperSize Yes
418 // These imaginary printers support printing at 600 and 1200 DPI.
419 // We'll use the new Option and Choice keywords to define the
420 // Resolution options...
422 // Option option-name option-text option-type
423 // Choice choice-name choice-text code
425 // "Option-type" is the type of option: boolean, pickone, or pickmany.
428 Option Resolution PickOne AnySetup 10
429 Choice "600dpi/600 DPI" "<</HWResolution[600 600]/cupsBitsPerColor 8>>setpagedevice"
430 Choice "1200dpi/1200 DPI" "<</HWResolution[1200 1200]/cupsBitsPerColor 8>>setpagedevice"
434 // One printer is grayscale only, and the other does grayscale
435 // and color. Define the grayscale color model for both printers
436 // using the new Option and Choice keywords.
439 Option "ColorModel/Color Mode" PickOne AnySetup 10
440 Choice Gray/Grayscale "<</cupsColorSpace $CUPS_CSPACE_W>>setpagedevice"
444 // Both printers provide two paper trays, which we'll define using
445 // the new Option and Choice keywords...
448 Option "InputSlot/Input Slot" PickOne AnySetup 10
449 Choice "Upper/Main Paper Tray" "<</MediaPosition 0>>setpagedevice"
450 Choice "LargeCapacity/Large Paper Tray" "<</MediaPosition 1>>setpagedevice"
454 // Both printers support duplexing...
456 // The Duplex keyword accepts values of "none" (no duplexing capability),
457 // "normal" (standard duplexing capability), and "flip" (auto-duplex that
458 // requires the back side to be flipped by the RIP...)
466 // The first sub-group contains the grayscale printer, which
467 // only needs the model name, PC filename, and model number
470 // The ModelName keyword defines the string that is shown to
474 ModelName "Mono Laser Printer"
478 // The ModelNumber keyword defines the cupsModelNumber
479 // attribute value. We use the "(name name)" notation
480 // to perform a bitwise OR of the #define'd constants.
483 ModelNumber ($MODEL_BW $MODEL_LASER)
487 // The PCFileName keyword defines the filename of the PPD
488 // file and should be 8 characters or less + the .ppd
492 PCFileName "fooglasr.ppd"
498 // The second sub-group contains the color printer, which
499 // needs another ColorModel definition along with the model
500 // name, PC filename, and model number values.
502 // The ModelName keyword defines the string that is shown to
506 ModelName "Color Laser Printer"
510 // The ModelNumber keyword defines the cupsModelNumber
511 // attribute value. We use the "(name name)" notation
512 // to perform a bitwise OR of the #define'd constants.
515 ModelNumber ($MODEL_COLOR $MODEL_LASER)
519 // The PCFileName keyword defines the filename of the PPD
520 // file and should be 8 characters or less + the .ppd
524 PCFileName "fooclasr.ppd"
528 // This printer does color printing, too, so add it and make
529 // RGB the default...
534 Option "ColorModel/Color Mode" PickOne AnySetup 10
535 *Choice RGB/Color "<</cupsColorSpace $CUPS_CSPACE_RGB>>setpagedevice"