4 // PPD file compiler test data file for the Common UNIX Printing
7 // Copyright 2007 by Apple Inc.
8 // Copyright 1997-2003 by Easy Software Products.
10 // These coded instructions, statements, and computer programs are the
11 // property of Apple Inc. and are protected by Federal copyright
12 // law. Distribution and use rights are outlined in the file "LICENSE.txt"
13 // which should have been included with this file. If this file is
14 // file is missing or damaged, see the license at "http://www.cups.org/".
18 * C-style comments are supported.
22 // C++-style comments are supported.
26 // Include the common media size definitions...
28 // #include directives support both <name> to include a standard file
29 // and "name" or just name without the quotes for a local file. Local
30 // files resolve relative to the current file's path. Unlike C/C++,
31 // #include <name> does not look in multiple directories, and
32 // #include "name" does not look in the standard directory.
39 // Include the CUPS raster definitions...
42 #include <raster.defs>
46 // Include the standard CUPS fonts...
53 // Define variables using the #define directive. In this case we
54 // are defining constants for the model number, which is used by
55 // our imaginary rastertofoo filter to determine which model-specific
56 // features to use/support.
67 // Media sizes are defined using the #media directive. The order of
68 // values is: size name/text, width, length.
70 // "Size name" is an alphanumeric string of up to 40 characters as
71 // defined by the Adobe PPD specification.
73 // "Size text" is a text string of up to 80 characters as defined by
74 // the Adobe PPD specification.
76 // "Width" and "length" are the width and length of the media size.
77 // Numbers by themselves represent points (72 points = 1 inch). The
78 // suffixes "cm", "ft", "in", "m", "mm", and "pt" are recognized to
79 // specify centimeters, feet, inches, meters, millimeters, and points,
83 #media "FooLetter/Foo Letter" 8in 10in
84 #media "FooPhoto/Foo Photo" 200mm 300mm
88 // Message catalogs can be included using #po...
95 // Specify that the drivers use all of the standard base fonts...
102 // All copyright lines are put at the top of the PPD file in order
103 // of their appearance. Copyright text can span multiple lines and
104 // will be properly included in the PPD file with comment prefixes
107 // First an MIT-style copyright/license notice...
110 Copyright "Copyright 2007 by Foo Industries."
112 Permission is granted for redistribution of this file as long as
113 this copyright notice is intact and the contents of the file are
114 not altered in any way from their original form.
116 Permission is hereby granted, free of charge, to any person
117 obtaining a copy of this software and associated documentation
118 files (the \"Software\"), to deal in the Software without
119 restriction, including without limitation the rights to use,
120 copy, modify, merge, publish, distribute, sublicense, and/or
121 sell copies of the Software, and to permit persons to whom the
122 Software is furnished to do so, subject to the following
125 The above copyright notice and this permission notice shall be
126 included in all copies or substantial portions of the Software.
128 THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,
129 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
130 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
131 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
132 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
133 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
134 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
135 OTHER DEALINGS IN THE SOFTWARE.
139 // Then a GPL notice...
142 Copyright "Copyright 2007 by Foo Industries."
144 This software is free software; you can redistribute it and/or
145 modify it under the terms of the GNU General Public License as
146 published by the Free Software Foundation; either version 2 of
147 the License, or (at your option) any later version.
149 This software is distributed in the hope that it will be useful,
150 but WITHOUT ANY WARRANTY; without even the implied warranty of
151 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
152 GNU General Public License for more details.
154 You should have received a copy of the GNU General Public
155 License along with this software; if not, write to the Free
156 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
162 // All printer drivers must define the manufacturer, model, PC
163 // filename, and version strings; since this test file contains
164 // drivers for an imaginary manufacturer "Foo", all of the drivers
165 // listed in this file share common manufacturer and version
174 // Printer drivers can access driver-specific attributes in a PPD
175 // file; these attributes are specified using lines of the form:
177 // Attribute name selector value
179 // "Name" is the name of the attribute and should start with either
180 // the "cups" prefix or the name of the vendor, e.g. "hpFoo",
181 // "epsonBar", etc. The name can be any alphanumeric character (a-z,
182 // A-Z, and 0-9) and cannot be a common prefix of another attribute,
183 // e.g. "fooLines" and "fooLinesPerInch" cannot be in the same file.
185 // "Selector" is a selector string containing any characters except
186 // colon (:). Typically this will be one or more keywords separated
187 // by the forward slash (/), however the empty string ("") can be used
188 // to omit the selector.
190 // "Value" is a quoted value string that can contain any printable
191 // characters except the double quote ("). Hexadecimal numbers
192 // inside angle brackets (<xx>) can be used to substitute escape
193 // codes and other special characters.
196 Attribute fooOutputFormat "" "PCL"
197 Attribute fooPJL Begin "<1B>%-12345X@PJL<0D0A>"
198 Attribute fooPJL Enter/PCL "@PJL ENTER LANGUAGE=PCL<0D0A>"
199 Attribute fooPJL End "<1B>%-12345X@PJL END JOB<0D0A>"
202 // Most printer drivers use filters; exceptions include PostScript
203 // printers and PPD files for software RIPs.
207 // Filter mime-type cost program
209 // The "mime-type" field defines the MIME type that the filter program
210 // accepts; for CUPS raster printer drivers, this will be
211 // "application/vnd.cups-raster".
213 // The "cost" field defines the relative cost of the filter in terms of
214 // both CPU and memory usage, and is used to limit the number of
215 // simultaneous jobs in some configurations. Most raster filters should
216 // have a cost of 100, unless the filter does no dithering - then a cost
217 // of 33 is more appropriate.
219 // The "program" field defined the filter program to run; use the null
220 // filter "-" to define a MIME type that the printer accepts directly.
221 // If no path information is provided, then the program will be run
222 // from the standard CUPS filter directory, usually
223 // /usr/lib/cups/filter.
225 // When compiling PPD files for PostScript capable devices that use
226 // additional filters, add a null filter for the MIME type
227 // "application/vnd.cups-postscript" so that printer commands, user
228 // job filters, and page markings can be added to the PostScript
229 // output that is sent to the printer.
232 Filter application/vnd.cups-raster 100 rastertofoo
236 // Attributes are included thusly...
239 Attribute cupsIPPReason "com.foo-serious-error/A Serious Error" "http://foo.com/serious.html"
243 // Curley braces are used for grouping common data and for isolating
244 // individual printer models. All data values are inherited *except*
245 // for the PCFilename and ModelName strings.
250 // Define two printer drivers that support only the FooLetter and
251 // FooPhoto media size. One is color, the other is black-and-white.
253 // Both printers share two MediaSize definitions; the name listed
254 // after the MediaSize keyword must be one of the Adobe standard
255 // names listed in the PPD specification or any named size defined
256 // using the #media directive.
258 // Default options are indicated by placing an asterisk (*) before
261 // For custom size and margin specification, see the next group of
270 // These imaginary printers support printing at 300, 600x300,
271 // and 600 DPI. We'll use the old-style Resolution convenience
272 // keyword which accepts the following parameters: colorspace/
273 // order, bits-per-color, row count, row feed, row step, and
276 // The name must be of the form NNNsuffix or NNNxMMMsuffix,
277 // where NNN and MMM represent the X and Y resolution in dots
281 Resolution - 8 0 0 0 "300dpi/300 DPI"
282 Resolution - 8 0 0 0 "600x300dpi/600 x 300 DPI"
283 *Resolution - 8 0 0 0 "600dpi/600 DPI"
287 // One printer is grayscale only, and the other does grayscale
288 // and color. Define the grayscale color model for both printers
289 // using the old-style ColorModel convenience keyword which
290 // accepts the name/text, colorspace, color order, and compression
294 ColorModel Gray/Grayscale w chunked 0
299 // The first sub-group contains the grayscale printer, which
300 // only needs the model name, PC filename, and model number
303 // The ModelName keyword defines the string that is shown to
307 ModelName "Mono Photo Printer"
311 // The ModelNumber keyword defines the cupsModelNumber
312 // attribute value. We use the "(name name)" notation
313 // to perform a bitwise OR of the #define'd constants.
316 ModelNumber ($MODEL_BW $MODEL_PHOTO)
320 // The PCFileName keyword defines the filename of the PPD
321 // file and should be 8 characters or less + the .ppd
325 PCFileName "foogphot.ppd"
331 // The second sub-group contains the color printer, which
332 // needs another ColorModel definition along with the model
333 // name, PC filename, and model number values. For fun, we'll
334 // add some input slots (paper trays) as well.
336 // The ModelName keyword defines the string that is shown to
340 ModelName "Color Photo Printer"
344 // The ModelNumber keyword defines the cupsModelNumber
345 // attribute value. We use the "(name name)" notation
346 // to perform a bitwise OR of the #define'd constants.
349 ModelNumber ($MODEL_COLOR $MODEL_PHOTO)
353 // The PCFileName keyword defines the filename of the PPD
354 // file and should be 8 characters or less + the .ppd
358 PCFileName "foocphot.ppd"
362 // This printer does color printing, too, so add it and make
363 // RGB the default...
368 *ColorModel RGB/Color rgb chunked 0
372 // The old-style InputSlot keyword accepts tray definitions
375 // InputSlot position name/text
378 InputSlot 0 "Upper/Main Paper Tray"
379 InputSlot 1 "LargeCapacity/Large Paper Tray"
386 // Define two printer drivers that support two typical laser
387 // printers with custom page sizes. One is color, the other is
390 // Both printers share several MediaSize definitions and support
391 // custom page sizes from 3x5 to 13x19 inches.
393 // All US media sizes use hardware margins of 0.25 inches on the sides
394 // and 12 points (1/6th inch) at the top and bottom. European sizes
395 // and custom sizes use margins of 12 points all around.
397 // The order of the HWMargins numbers are left, bottom, right, and top.
398 // The current HWMargins values are used when defining each media size.
399 // The last HWMargins values are used for custom page size margins.
402 HWMargins 0.25in 12pt 0.25in 12pt
407 MediaSize TabloidExtra
409 HWMargins 12pt 12pt 12pt 12pt
414 // Specify that custom/variable paper sizes are supported, and the
415 // range of sizes that are supported...
418 VariablePaperSize Yes
424 // These imaginary printers support printing at 600 and 1200 DPI.
425 // We'll use the new Option and Choice keywords to define the
426 // Resolution options...
428 // Option option-name option-text option-type
429 // Choice choice-name choice-text code
431 // "Option-type" is the type of option: boolean, pickone, or pickmany.
434 Option Resolution PickOne AnySetup 10
435 Choice "600dpi/600 DPI" "<</HWResolution[600 600]/cupsBitsPerColor 8>>setpagedevice"
436 Choice "1200dpi/1200 DPI" "<</HWResolution[1200 1200]/cupsBitsPerColor 8>>setpagedevice"
440 // One printer is grayscale only, and the other does grayscale
441 // and color. Define the grayscale color model for both printers
442 // using the new Option and Choice keywords.
445 Option "ColorModel/Color Mode" PickOne AnySetup 10
446 Choice Gray/Grayscale "<</cupsColorSpace $CUPS_CSPACE_W>>setpagedevice"
450 // Both printers provide two paper trays, which we'll define using
451 // the new Option and Choice keywords...
454 Option "InputSlot/Input Slot" PickOne AnySetup 10
455 Choice "Upper/Main Paper Tray" "<</MediaPosition 0>>setpagedevice"
456 Choice "LargeCapacity/Large Paper Tray" "<</MediaPosition 1>>setpagedevice"
460 // Both printers support duplexing...
462 // The Duplex keyword accepts values of "none" (no duplexing capability),
463 // "normal" (standard duplexing capability), and "flip" (auto-duplex that
464 // requires the back side to be flipped by the RIP...)
472 // The first sub-group contains the grayscale printer, which
473 // only needs the model name, PC filename, and model number
476 // The ModelName keyword defines the string that is shown to
480 ModelName "Mono Laser Printer"
484 // The ModelNumber keyword defines the cupsModelNumber
485 // attribute value. We use the "(name name)" notation
486 // to perform a bitwise OR of the #define'd constants.
489 ModelNumber ($MODEL_BW $MODEL_LASER)
493 // The PCFileName keyword defines the filename of the PPD
494 // file and should be 8 characters or less + the .ppd
498 PCFileName "fooglasr.ppd"
504 // The second sub-group contains the color printer, which
505 // needs another ColorModel definition along with the model
506 // name, PC filename, and model number values.
508 // The ModelName keyword defines the string that is shown to
512 ModelName "Color Laser Printer"
516 // The ModelNumber keyword defines the cupsModelNumber
517 // attribute value. We use the "(name name)" notation
518 // to perform a bitwise OR of the #define'd constants.
521 ModelNumber ($MODEL_COLOR $MODEL_LASER)
525 // The PCFileName keyword defines the filename of the PPD
526 // file and should be 8 characters or less + the .ppd
530 PCFileName "fooclasr.ppd"
534 // This printer does color printing, too, so add it and make
535 // RGB the default...
540 Option "ColorModel/Color Mode" PickOne AnySetup 10
541 *Choice RGB/Color "<</cupsColorSpace $CUPS_CSPACE_RGB>>setpagedevice"