1*5e7646d2SAndroid Build Coastguard Worker// 2*5e7646d2SAndroid Build Coastguard Worker// PPD file compiler test data file for CUPS. 3*5e7646d2SAndroid Build Coastguard Worker// 4*5e7646d2SAndroid Build Coastguard Worker// Copyright © 2007-2011 by Apple Inc. 5*5e7646d2SAndroid Build Coastguard Worker// Copyright © 1997-2003 by Easy Software Products. 6*5e7646d2SAndroid Build Coastguard Worker// 7*5e7646d2SAndroid Build Coastguard Worker// Licensed under Apache License v2.0. See the file "LICENSE" for more 8*5e7646d2SAndroid Build Coastguard Worker// information. 9*5e7646d2SAndroid Build Coastguard Worker// 10*5e7646d2SAndroid Build Coastguard Worker 11*5e7646d2SAndroid Build Coastguard Worker/* 12*5e7646d2SAndroid Build Coastguard Worker * C-style comments are supported. 13*5e7646d2SAndroid Build Coastguard Worker */ 14*5e7646d2SAndroid Build Coastguard Worker 15*5e7646d2SAndroid Build Coastguard Worker// 16*5e7646d2SAndroid Build Coastguard Worker// C++-style comments are supported. 17*5e7646d2SAndroid Build Coastguard Worker// 18*5e7646d2SAndroid Build Coastguard Worker 19*5e7646d2SAndroid Build Coastguard Worker// 20*5e7646d2SAndroid Build Coastguard Worker// Include the common media size definitions... 21*5e7646d2SAndroid Build Coastguard Worker// 22*5e7646d2SAndroid Build Coastguard Worker// #include directives support both <name> to include a standard file 23*5e7646d2SAndroid Build Coastguard Worker// and "name" or just name without the quotes for a local file. Local 24*5e7646d2SAndroid Build Coastguard Worker// files resolve relative to the current file's path. Unlike C/C++, 25*5e7646d2SAndroid Build Coastguard Worker// #include <name> does not look in multiple directories, and 26*5e7646d2SAndroid Build Coastguard Worker// #include "name" does not look in the standard directory. 27*5e7646d2SAndroid Build Coastguard Worker// 28*5e7646d2SAndroid Build Coastguard Worker 29*5e7646d2SAndroid Build Coastguard Worker#include <media.defs> 30*5e7646d2SAndroid Build Coastguard Worker 31*5e7646d2SAndroid Build Coastguard Worker 32*5e7646d2SAndroid Build Coastguard Worker// 33*5e7646d2SAndroid Build Coastguard Worker// Include the CUPS raster definitions... 34*5e7646d2SAndroid Build Coastguard Worker// 35*5e7646d2SAndroid Build Coastguard Worker 36*5e7646d2SAndroid Build Coastguard Worker#include <raster.defs> 37*5e7646d2SAndroid Build Coastguard Worker 38*5e7646d2SAndroid Build Coastguard Worker 39*5e7646d2SAndroid Build Coastguard Worker// 40*5e7646d2SAndroid Build Coastguard Worker// Include the standard CUPS fonts... 41*5e7646d2SAndroid Build Coastguard Worker// 42*5e7646d2SAndroid Build Coastguard Worker 43*5e7646d2SAndroid Build Coastguard Worker#include <font.defs> 44*5e7646d2SAndroid Build Coastguard Worker 45*5e7646d2SAndroid Build Coastguard Worker 46*5e7646d2SAndroid Build Coastguard Worker// 47*5e7646d2SAndroid Build Coastguard Worker// Define variables using the #define directive. In this case we 48*5e7646d2SAndroid Build Coastguard Worker// are defining constants for the model number, which is used by 49*5e7646d2SAndroid Build Coastguard Worker// our imaginary rastertofoo filter to determine which model-specific 50*5e7646d2SAndroid Build Coastguard Worker// features to use/support. 51*5e7646d2SAndroid Build Coastguard Worker// 52*5e7646d2SAndroid Build Coastguard Worker 53*5e7646d2SAndroid Build Coastguard Worker#define MODEL_BW 0 54*5e7646d2SAndroid Build Coastguard Worker#define MODEL_COLOR 1 55*5e7646d2SAndroid Build Coastguard Worker 56*5e7646d2SAndroid Build Coastguard Worker#define MODEL_LASER 0 57*5e7646d2SAndroid Build Coastguard Worker#define MODEL_PHOTO 2 58*5e7646d2SAndroid Build Coastguard Worker 59*5e7646d2SAndroid Build Coastguard Worker 60*5e7646d2SAndroid Build Coastguard Worker// 61*5e7646d2SAndroid Build Coastguard Worker// Media sizes are defined using the #media directive. The order of 62*5e7646d2SAndroid Build Coastguard Worker// values is: size name/text, width, length. 63*5e7646d2SAndroid Build Coastguard Worker// 64*5e7646d2SAndroid Build Coastguard Worker// "Size name" is an alphanumeric string of up to 40 characters as 65*5e7646d2SAndroid Build Coastguard Worker// defined by the Adobe PPD specification. 66*5e7646d2SAndroid Build Coastguard Worker// 67*5e7646d2SAndroid Build Coastguard Worker// "Size text" is a text string of up to 80 characters as defined by 68*5e7646d2SAndroid Build Coastguard Worker// the Adobe PPD specification. 69*5e7646d2SAndroid Build Coastguard Worker// 70*5e7646d2SAndroid Build Coastguard Worker// "Width" and "length" are the width and length of the media size. 71*5e7646d2SAndroid Build Coastguard Worker// Numbers by themselves represent points (72 points = 1 inch). The 72*5e7646d2SAndroid Build Coastguard Worker// suffixes "cm", "ft", "in", "m", "mm", and "pt" are recognized to 73*5e7646d2SAndroid Build Coastguard Worker// specify centimeters, feet, inches, meters, millimeters, and points, 74*5e7646d2SAndroid Build Coastguard Worker// respectively. 75*5e7646d2SAndroid Build Coastguard Worker// 76*5e7646d2SAndroid Build Coastguard Worker 77*5e7646d2SAndroid Build Coastguard Worker#media "FooLetter/Foo Letter" 8in 10in 78*5e7646d2SAndroid Build Coastguard Worker#media "FooPhoto/Foo Photo" 200mm 300mm 79*5e7646d2SAndroid Build Coastguard Worker 80*5e7646d2SAndroid Build Coastguard Worker 81*5e7646d2SAndroid Build Coastguard Worker// 82*5e7646d2SAndroid Build Coastguard Worker// Message catalogs can be included using #po... 83*5e7646d2SAndroid Build Coastguard Worker// 84*5e7646d2SAndroid Build Coastguard Worker 85*5e7646d2SAndroid Build Coastguard Worker#po fr foo-fr.po 86*5e7646d2SAndroid Build Coastguard Worker 87*5e7646d2SAndroid Build Coastguard Worker 88*5e7646d2SAndroid Build Coastguard Worker// 89*5e7646d2SAndroid Build Coastguard Worker// Specify that the drivers use all of the standard base fonts... 90*5e7646d2SAndroid Build Coastguard Worker// 91*5e7646d2SAndroid Build Coastguard Worker 92*5e7646d2SAndroid Build Coastguard WorkerFont * 93*5e7646d2SAndroid Build Coastguard Worker 94*5e7646d2SAndroid Build Coastguard Worker 95*5e7646d2SAndroid Build Coastguard Worker// 96*5e7646d2SAndroid Build Coastguard Worker// All copyright lines are put at the top of the PPD file in order 97*5e7646d2SAndroid Build Coastguard Worker// of their appearance. Copyright text can span multiple lines and 98*5e7646d2SAndroid Build Coastguard Worker// will be properly included in the PPD file with comment prefixes 99*5e7646d2SAndroid Build Coastguard Worker// on each line. 100*5e7646d2SAndroid Build Coastguard Worker// 101*5e7646d2SAndroid Build Coastguard Worker// First an MIT-style copyright/license notice... 102*5e7646d2SAndroid Build Coastguard Worker// 103*5e7646d2SAndroid Build Coastguard Worker 104*5e7646d2SAndroid Build Coastguard WorkerCopyright "Copyright 2007 by Foo Industries." 105*5e7646d2SAndroid Build Coastguard WorkerCopyright " 106*5e7646d2SAndroid Build Coastguard WorkerPermission is granted for redistribution of this file as long as 107*5e7646d2SAndroid Build Coastguard Workerthis copyright notice is intact and the contents of the file are 108*5e7646d2SAndroid Build Coastguard Workernot altered in any way from their original form. 109*5e7646d2SAndroid Build Coastguard Worker 110*5e7646d2SAndroid Build Coastguard WorkerPermission is hereby granted, free of charge, to any person 111*5e7646d2SAndroid Build Coastguard Workerobtaining a copy of this software and associated documentation 112*5e7646d2SAndroid Build Coastguard Workerfiles (the \"Software\"), to deal in the Software without 113*5e7646d2SAndroid Build Coastguard Workerrestriction, including without limitation the rights to use, 114*5e7646d2SAndroid Build Coastguard Workercopy, modify, merge, publish, distribute, sublicense, and/or 115*5e7646d2SAndroid Build Coastguard Workersell copies of the Software, and to permit persons to whom the 116*5e7646d2SAndroid Build Coastguard WorkerSoftware is furnished to do so, subject to the following 117*5e7646d2SAndroid Build Coastguard Workerconditions: 118*5e7646d2SAndroid Build Coastguard Worker 119*5e7646d2SAndroid Build Coastguard WorkerThe above copyright notice and this permission notice shall be 120*5e7646d2SAndroid Build Coastguard Workerincluded in all copies or substantial portions of the Software. 121*5e7646d2SAndroid Build Coastguard Worker 122*5e7646d2SAndroid Build Coastguard WorkerTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, 123*5e7646d2SAndroid Build Coastguard WorkerEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 124*5e7646d2SAndroid Build Coastguard WorkerOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 125*5e7646d2SAndroid Build Coastguard WorkerNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 126*5e7646d2SAndroid Build Coastguard WorkerHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 127*5e7646d2SAndroid Build Coastguard WorkerWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 128*5e7646d2SAndroid Build Coastguard WorkerFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 129*5e7646d2SAndroid Build Coastguard WorkerOTHER DEALINGS IN THE SOFTWARE. 130*5e7646d2SAndroid Build Coastguard Worker" 131*5e7646d2SAndroid Build Coastguard Worker 132*5e7646d2SAndroid Build Coastguard Worker// 133*5e7646d2SAndroid Build Coastguard Worker// Then a GPL notice... 134*5e7646d2SAndroid Build Coastguard Worker// 135*5e7646d2SAndroid Build Coastguard Worker 136*5e7646d2SAndroid Build Coastguard WorkerCopyright "Copyright 2007 by Foo Industries." 137*5e7646d2SAndroid Build Coastguard WorkerCopyright " 138*5e7646d2SAndroid Build Coastguard WorkerThis software is free software; you can redistribute it and/or 139*5e7646d2SAndroid Build Coastguard Workermodify it under the terms of the GNU General Public License as 140*5e7646d2SAndroid Build Coastguard Workerpublished by the Free Software Foundation; either version 2 of 141*5e7646d2SAndroid Build Coastguard Workerthe License, or (at your option) any later version. 142*5e7646d2SAndroid Build Coastguard Worker 143*5e7646d2SAndroid Build Coastguard WorkerThis software is distributed in the hope that it will be useful, 144*5e7646d2SAndroid Build Coastguard Workerbut WITHOUT ANY WARRANTY; without even the implied warranty of 145*5e7646d2SAndroid Build Coastguard WorkerMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 146*5e7646d2SAndroid Build Coastguard WorkerGNU General Public License for more details. 147*5e7646d2SAndroid Build Coastguard Worker 148*5e7646d2SAndroid Build Coastguard WorkerYou should have received a copy of the GNU General Public 149*5e7646d2SAndroid Build Coastguard WorkerLicense along with this software; if not, write to the Free 150*5e7646d2SAndroid Build Coastguard WorkerSoftware Foundation, Inc., 59 Temple Place, Suite 330, Boston, 151*5e7646d2SAndroid Build Coastguard WorkerMA 02111 USA 152*5e7646d2SAndroid Build Coastguard Worker" 153*5e7646d2SAndroid Build Coastguard Worker 154*5e7646d2SAndroid Build Coastguard Worker 155*5e7646d2SAndroid Build Coastguard Worker// 156*5e7646d2SAndroid Build Coastguard Worker// All printer drivers must define the manufacturer, model, PC 157*5e7646d2SAndroid Build Coastguard Worker// filename, and version strings; since this test file contains 158*5e7646d2SAndroid Build Coastguard Worker// drivers for an imaginary manufacturer "Foo", all of the drivers 159*5e7646d2SAndroid Build Coastguard Worker// listed in this file share common manufacturer and version 160*5e7646d2SAndroid Build Coastguard Worker// strings. 161*5e7646d2SAndroid Build Coastguard Worker// 162*5e7646d2SAndroid Build Coastguard Worker 163*5e7646d2SAndroid Build Coastguard WorkerManufacturer "Foo" 164*5e7646d2SAndroid Build Coastguard WorkerVersion 1.0 165*5e7646d2SAndroid Build Coastguard Worker 166*5e7646d2SAndroid Build Coastguard Worker 167*5e7646d2SAndroid Build Coastguard Worker// 168*5e7646d2SAndroid Build Coastguard Worker// Printer drivers can access driver-specific attributes in a PPD 169*5e7646d2SAndroid Build Coastguard Worker// file; these attributes are specified using lines of the form: 170*5e7646d2SAndroid Build Coastguard Worker// 171*5e7646d2SAndroid Build Coastguard Worker// Attribute name selector value 172*5e7646d2SAndroid Build Coastguard Worker// 173*5e7646d2SAndroid Build Coastguard Worker// "Name" is the name of the attribute and should start with either 174*5e7646d2SAndroid Build Coastguard Worker// the "cups" prefix or the name of the vendor, e.g. "hpFoo", 175*5e7646d2SAndroid Build Coastguard Worker// "epsonBar", etc. The name can be any alphanumeric character (a-z, 176*5e7646d2SAndroid Build Coastguard Worker// A-Z, and 0-9) and cannot be a common prefix of another attribute, 177*5e7646d2SAndroid Build Coastguard Worker// e.g. "fooLines" and "fooLinesPerInch" cannot be in the same file. 178*5e7646d2SAndroid Build Coastguard Worker// 179*5e7646d2SAndroid Build Coastguard Worker// "Selector" is a selector string containing any characters except 180*5e7646d2SAndroid Build Coastguard Worker// colon (:). Typically this will be one or more keywords separated 181*5e7646d2SAndroid Build Coastguard Worker// by the forward slash (/), however the empty string ("") can be used 182*5e7646d2SAndroid Build Coastguard Worker// to omit the selector. 183*5e7646d2SAndroid Build Coastguard Worker// 184*5e7646d2SAndroid Build Coastguard Worker// "Value" is a quoted value string that can contain any printable 185*5e7646d2SAndroid Build Coastguard Worker// characters except the double quote ("). Hexadecimal numbers 186*5e7646d2SAndroid Build Coastguard Worker// inside angle brackets (<xx>) can be used to substitute escape 187*5e7646d2SAndroid Build Coastguard Worker// codes and other special characters. 188*5e7646d2SAndroid Build Coastguard Worker// 189*5e7646d2SAndroid Build Coastguard Worker 190*5e7646d2SAndroid Build Coastguard WorkerAttribute fooOutputFormat "" "PCL" 191*5e7646d2SAndroid Build Coastguard WorkerAttribute fooPJL Begin "<1B>%-12345X@PJL<0D0A>" 192*5e7646d2SAndroid Build Coastguard WorkerAttribute fooPJL Enter/PCL "@PJL ENTER LANGUAGE=PCL<0D0A>" 193*5e7646d2SAndroid Build Coastguard WorkerAttribute fooPJL End "<1B>%-12345X@PJL END JOB<0D0A>" 194*5e7646d2SAndroid Build Coastguard Worker 195*5e7646d2SAndroid Build Coastguard Worker// 196*5e7646d2SAndroid Build Coastguard Worker// Most printer drivers use filters; exceptions include PostScript 197*5e7646d2SAndroid Build Coastguard Worker// printers and PPD files for software RIPs. 198*5e7646d2SAndroid Build Coastguard Worker// 199*5e7646d2SAndroid Build Coastguard Worker// The format is: 200*5e7646d2SAndroid Build Coastguard Worker// 201*5e7646d2SAndroid Build Coastguard Worker// Filter mime-type cost program 202*5e7646d2SAndroid Build Coastguard Worker// 203*5e7646d2SAndroid Build Coastguard Worker// The "mime-type" field defines the MIME type that the filter program 204*5e7646d2SAndroid Build Coastguard Worker// accepts; for CUPS raster printer drivers, this will be 205*5e7646d2SAndroid Build Coastguard Worker// "application/vnd.cups-raster". 206*5e7646d2SAndroid Build Coastguard Worker// 207*5e7646d2SAndroid Build Coastguard Worker// The "cost" field defines the relative cost of the filter in terms of 208*5e7646d2SAndroid Build Coastguard Worker// both CPU and memory usage, and is used to limit the number of 209*5e7646d2SAndroid Build Coastguard Worker// simultaneous jobs in some configurations. Most raster filters should 210*5e7646d2SAndroid Build Coastguard Worker// have a cost of 100, unless the filter does no dithering - then a cost 211*5e7646d2SAndroid Build Coastguard Worker// of 33 is more appropriate. 212*5e7646d2SAndroid Build Coastguard Worker// 213*5e7646d2SAndroid Build Coastguard Worker// The "program" field defined the filter program to run; use the null 214*5e7646d2SAndroid Build Coastguard Worker// filter "-" to define a MIME type that the printer accepts directly. 215*5e7646d2SAndroid Build Coastguard Worker// If no path information is provided, then the program will be run 216*5e7646d2SAndroid Build Coastguard Worker// from the standard CUPS filter directory, usually 217*5e7646d2SAndroid Build Coastguard Worker// /usr/lib/cups/filter. 218*5e7646d2SAndroid Build Coastguard Worker// 219*5e7646d2SAndroid Build Coastguard Worker// When compiling PPD files for PostScript capable devices that use 220*5e7646d2SAndroid Build Coastguard Worker// additional filters, add a null filter for the MIME type 221*5e7646d2SAndroid Build Coastguard Worker// "application/vnd.cups-postscript" so that printer commands, user 222*5e7646d2SAndroid Build Coastguard Worker// job filters, and page markings can be added to the PostScript 223*5e7646d2SAndroid Build Coastguard Worker// output that is sent to the printer. 224*5e7646d2SAndroid Build Coastguard Worker// 225*5e7646d2SAndroid Build Coastguard Worker 226*5e7646d2SAndroid Build Coastguard WorkerFilter application/vnd.cups-raster 100 rastertofoo 227*5e7646d2SAndroid Build Coastguard Worker 228*5e7646d2SAndroid Build Coastguard Worker 229*5e7646d2SAndroid Build Coastguard Worker// 230*5e7646d2SAndroid Build Coastguard Worker// Attributes are included thusly... 231*5e7646d2SAndroid Build Coastguard Worker// 232*5e7646d2SAndroid Build Coastguard Worker 233*5e7646d2SAndroid Build Coastguard WorkerAttribute cupsIPPReason "com.foo-serious-error/A Serious Error" "http://foo.com/serious.html" 234*5e7646d2SAndroid Build Coastguard Worker 235*5e7646d2SAndroid Build Coastguard Worker 236*5e7646d2SAndroid Build Coastguard Worker// 237*5e7646d2SAndroid Build Coastguard Worker// Curley braces are used for grouping common data and for isolating 238*5e7646d2SAndroid Build Coastguard Worker// individual printer models. All data values are inherited *except* 239*5e7646d2SAndroid Build Coastguard Worker// for the PCFilename and ModelName strings. 240*5e7646d2SAndroid Build Coastguard Worker// 241*5e7646d2SAndroid Build Coastguard Worker 242*5e7646d2SAndroid Build Coastguard Worker{ 243*5e7646d2SAndroid Build Coastguard Worker // 244*5e7646d2SAndroid Build Coastguard Worker // Define two printer drivers that support only the FooLetter and 245*5e7646d2SAndroid Build Coastguard Worker // FooPhoto media size. One is color, the other is black-and-white. 246*5e7646d2SAndroid Build Coastguard Worker // 247*5e7646d2SAndroid Build Coastguard Worker // Both printers share two MediaSize definitions; the name listed 248*5e7646d2SAndroid Build Coastguard Worker // after the MediaSize keyword must be one of the Adobe standard 249*5e7646d2SAndroid Build Coastguard Worker // names listed in the PPD specification or any named size defined 250*5e7646d2SAndroid Build Coastguard Worker // using the #media directive. 251*5e7646d2SAndroid Build Coastguard Worker // 252*5e7646d2SAndroid Build Coastguard Worker // Default options are indicated by placing an asterisk (*) before 253*5e7646d2SAndroid Build Coastguard Worker // the keyword. 254*5e7646d2SAndroid Build Coastguard Worker // 255*5e7646d2SAndroid Build Coastguard Worker // For custom size and margin specification, see the next group of 256*5e7646d2SAndroid Build Coastguard Worker // printer drivers. 257*5e7646d2SAndroid Build Coastguard Worker // 258*5e7646d2SAndroid Build Coastguard Worker 259*5e7646d2SAndroid Build Coastguard Worker MediaSize FooLetter 260*5e7646d2SAndroid Build Coastguard Worker *MediaSize FooPhoto 261*5e7646d2SAndroid Build Coastguard Worker 262*5e7646d2SAndroid Build Coastguard Worker 263*5e7646d2SAndroid Build Coastguard Worker // 264*5e7646d2SAndroid Build Coastguard Worker // These imaginary printers support printing at 300, 600x300, 265*5e7646d2SAndroid Build Coastguard Worker // and 600 DPI. We'll use the old-style Resolution convenience 266*5e7646d2SAndroid Build Coastguard Worker // keyword which accepts the following parameters: colorspace/ 267*5e7646d2SAndroid Build Coastguard Worker // order, bits-per-color, row count, row feed, row step, and 268*5e7646d2SAndroid Build Coastguard Worker // name/text. 269*5e7646d2SAndroid Build Coastguard Worker // 270*5e7646d2SAndroid Build Coastguard Worker // The name must be of the form NNNsuffix or NNNxMMMsuffix, 271*5e7646d2SAndroid Build Coastguard Worker // where NNN and MMM represent the X and Y resolution in dots 272*5e7646d2SAndroid Build Coastguard Worker // per inch. 273*5e7646d2SAndroid Build Coastguard Worker // 274*5e7646d2SAndroid Build Coastguard Worker 275*5e7646d2SAndroid Build Coastguard Worker Resolution - 8 0 0 0 "300dpi/300 DPI" 276*5e7646d2SAndroid Build Coastguard Worker Resolution - 8 0 0 0 "600x300dpi/600 x 300 DPI" 277*5e7646d2SAndroid Build Coastguard Worker *Resolution - 8 0 0 0 "600dpi/600 DPI" 278*5e7646d2SAndroid Build Coastguard Worker 279*5e7646d2SAndroid Build Coastguard Worker 280*5e7646d2SAndroid Build Coastguard Worker // 281*5e7646d2SAndroid Build Coastguard Worker // One printer is grayscale only, and the other does grayscale 282*5e7646d2SAndroid Build Coastguard Worker // and color. Define the grayscale color model for both printers 283*5e7646d2SAndroid Build Coastguard Worker // using the old-style ColorModel convenience keyword which 284*5e7646d2SAndroid Build Coastguard Worker // accepts the name/text, colorspace, color order, and compression 285*5e7646d2SAndroid Build Coastguard Worker // parameters. 286*5e7646d2SAndroid Build Coastguard Worker // 287*5e7646d2SAndroid Build Coastguard Worker 288*5e7646d2SAndroid Build Coastguard Worker ColorModel Gray/Grayscale w chunked 0 289*5e7646d2SAndroid Build Coastguard Worker 290*5e7646d2SAndroid Build Coastguard Worker 291*5e7646d2SAndroid Build Coastguard Worker { 292*5e7646d2SAndroid Build Coastguard Worker // 293*5e7646d2SAndroid Build Coastguard Worker // The first sub-group contains the grayscale printer, which 294*5e7646d2SAndroid Build Coastguard Worker // only needs the model name, PC filename, and model number 295*5e7646d2SAndroid Build Coastguard Worker // values set... 296*5e7646d2SAndroid Build Coastguard Worker // 297*5e7646d2SAndroid Build Coastguard Worker // The ModelName keyword defines the string that is shown to 298*5e7646d2SAndroid Build Coastguard Worker // the user. 299*5e7646d2SAndroid Build Coastguard Worker // 300*5e7646d2SAndroid Build Coastguard Worker 301*5e7646d2SAndroid Build Coastguard Worker ModelName "Mono Photo Printer" 302*5e7646d2SAndroid Build Coastguard Worker 303*5e7646d2SAndroid Build Coastguard Worker 304*5e7646d2SAndroid Build Coastguard Worker // 305*5e7646d2SAndroid Build Coastguard Worker // The ModelNumber keyword defines the cupsModelNumber 306*5e7646d2SAndroid Build Coastguard Worker // attribute value. We use the "(name name)" notation 307*5e7646d2SAndroid Build Coastguard Worker // to perform a bitwise OR of the #define'd constants. 308*5e7646d2SAndroid Build Coastguard Worker // 309*5e7646d2SAndroid Build Coastguard Worker 310*5e7646d2SAndroid Build Coastguard Worker ModelNumber ($MODEL_BW $MODEL_PHOTO) 311*5e7646d2SAndroid Build Coastguard Worker 312*5e7646d2SAndroid Build Coastguard Worker 313*5e7646d2SAndroid Build Coastguard Worker // 314*5e7646d2SAndroid Build Coastguard Worker // The PCFileName keyword defines the filename of the PPD 315*5e7646d2SAndroid Build Coastguard Worker // file and should be 8 characters or less + the .ppd 316*5e7646d2SAndroid Build Coastguard Worker // extension. 317*5e7646d2SAndroid Build Coastguard Worker // 318*5e7646d2SAndroid Build Coastguard Worker 319*5e7646d2SAndroid Build Coastguard Worker PCFileName "foogphot.ppd" 320*5e7646d2SAndroid Build Coastguard Worker } 321*5e7646d2SAndroid Build Coastguard Worker 322*5e7646d2SAndroid Build Coastguard Worker 323*5e7646d2SAndroid Build Coastguard Worker { 324*5e7646d2SAndroid Build Coastguard Worker // 325*5e7646d2SAndroid Build Coastguard Worker // The second sub-group contains the color printer, which 326*5e7646d2SAndroid Build Coastguard Worker // needs another ColorModel definition along with the model 327*5e7646d2SAndroid Build Coastguard Worker // name, PC filename, and model number values. For fun, we'll 328*5e7646d2SAndroid Build Coastguard Worker // add some input slots (paper trays) as well. 329*5e7646d2SAndroid Build Coastguard Worker // 330*5e7646d2SAndroid Build Coastguard Worker // The ModelName keyword defines the string that is shown to 331*5e7646d2SAndroid Build Coastguard Worker // the user. 332*5e7646d2SAndroid Build Coastguard Worker // 333*5e7646d2SAndroid Build Coastguard Worker 334*5e7646d2SAndroid Build Coastguard Worker ModelName "Color Photo Printer" 335*5e7646d2SAndroid Build Coastguard Worker 336*5e7646d2SAndroid Build Coastguard Worker 337*5e7646d2SAndroid Build Coastguard Worker // 338*5e7646d2SAndroid Build Coastguard Worker // The ModelNumber keyword defines the cupsModelNumber 339*5e7646d2SAndroid Build Coastguard Worker // attribute value. We use the "(name name)" notation 340*5e7646d2SAndroid Build Coastguard Worker // to perform a bitwise OR of the #define'd constants. 341*5e7646d2SAndroid Build Coastguard Worker // 342*5e7646d2SAndroid Build Coastguard Worker 343*5e7646d2SAndroid Build Coastguard Worker ModelNumber ($MODEL_COLOR $MODEL_PHOTO) 344*5e7646d2SAndroid Build Coastguard Worker 345*5e7646d2SAndroid Build Coastguard Worker 346*5e7646d2SAndroid Build Coastguard Worker // 347*5e7646d2SAndroid Build Coastguard Worker // The PCFileName keyword defines the filename of the PPD 348*5e7646d2SAndroid Build Coastguard Worker // file and should be 8 characters or less + the .ppd 349*5e7646d2SAndroid Build Coastguard Worker // extension. 350*5e7646d2SAndroid Build Coastguard Worker // 351*5e7646d2SAndroid Build Coastguard Worker 352*5e7646d2SAndroid Build Coastguard Worker PCFileName "foocphot.ppd" 353*5e7646d2SAndroid Build Coastguard Worker 354*5e7646d2SAndroid Build Coastguard Worker 355*5e7646d2SAndroid Build Coastguard Worker // 356*5e7646d2SAndroid Build Coastguard Worker // This printer does color printing, too, so add it and make 357*5e7646d2SAndroid Build Coastguard Worker // RGB the default... 358*5e7646d2SAndroid Build Coastguard Worker // 359*5e7646d2SAndroid Build Coastguard Worker 360*5e7646d2SAndroid Build Coastguard Worker ColorDevice Yes 361*5e7646d2SAndroid Build Coastguard Worker 362*5e7646d2SAndroid Build Coastguard Worker *ColorModel RGB/Color rgb chunked 0 363*5e7646d2SAndroid Build Coastguard Worker 364*5e7646d2SAndroid Build Coastguard Worker 365*5e7646d2SAndroid Build Coastguard Worker // 366*5e7646d2SAndroid Build Coastguard Worker // The old-style InputSlot keyword accepts tray definitions 367*5e7646d2SAndroid Build Coastguard Worker // of the form: 368*5e7646d2SAndroid Build Coastguard Worker // 369*5e7646d2SAndroid Build Coastguard Worker // InputSlot position name/text 370*5e7646d2SAndroid Build Coastguard Worker // 371*5e7646d2SAndroid Build Coastguard Worker 372*5e7646d2SAndroid Build Coastguard Worker InputSlot 0 "Upper/Main Paper Tray" 373*5e7646d2SAndroid Build Coastguard Worker InputSlot 1 "LargeCapacity/Large Paper Tray" 374*5e7646d2SAndroid Build Coastguard Worker } 375*5e7646d2SAndroid Build Coastguard Worker} 376*5e7646d2SAndroid Build Coastguard Worker 377*5e7646d2SAndroid Build Coastguard Worker 378*5e7646d2SAndroid Build Coastguard Worker{ 379*5e7646d2SAndroid Build Coastguard Worker // 380*5e7646d2SAndroid Build Coastguard Worker // Define two printer drivers that support two typical laser 381*5e7646d2SAndroid Build Coastguard Worker // printers with custom page sizes. One is color, the other is 382*5e7646d2SAndroid Build Coastguard Worker // black-and-white. 383*5e7646d2SAndroid Build Coastguard Worker // 384*5e7646d2SAndroid Build Coastguard Worker // Both printers share several MediaSize definitions and support 385*5e7646d2SAndroid Build Coastguard Worker // custom page sizes from 3x5 to 13x19 inches. 386*5e7646d2SAndroid Build Coastguard Worker // 387*5e7646d2SAndroid Build Coastguard Worker // All US media sizes use hardware margins of 0.25 inches on the sides 388*5e7646d2SAndroid Build Coastguard Worker // and 12 points (1/6th inch) at the top and bottom. European sizes 389*5e7646d2SAndroid Build Coastguard Worker // and custom sizes use margins of 12 points all around. 390*5e7646d2SAndroid Build Coastguard Worker // 391*5e7646d2SAndroid Build Coastguard Worker // The order of the HWMargins numbers are left, bottom, right, and top. 392*5e7646d2SAndroid Build Coastguard Worker // The current HWMargins values are used when defining each media size. 393*5e7646d2SAndroid Build Coastguard Worker // The last HWMargins values are used for custom page size margins. 394*5e7646d2SAndroid Build Coastguard Worker // 395*5e7646d2SAndroid Build Coastguard Worker 396*5e7646d2SAndroid Build Coastguard Worker HWMargins 0.25in 12pt 0.25in 12pt 397*5e7646d2SAndroid Build Coastguard Worker 398*5e7646d2SAndroid Build Coastguard Worker *MediaSize Letter 399*5e7646d2SAndroid Build Coastguard Worker MediaSize Legal 400*5e7646d2SAndroid Build Coastguard Worker MediaSize Tabloid 401*5e7646d2SAndroid Build Coastguard Worker MediaSize TabloidExtra 402*5e7646d2SAndroid Build Coastguard Worker 403*5e7646d2SAndroid Build Coastguard Worker HWMargins 12pt 12pt 12pt 12pt 404*5e7646d2SAndroid Build Coastguard Worker MediaSize A4 405*5e7646d2SAndroid Build Coastguard Worker MediaSize A3 406*5e7646d2SAndroid Build Coastguard Worker 407*5e7646d2SAndroid Build Coastguard Worker // 408*5e7646d2SAndroid Build Coastguard Worker // Specify that custom/variable paper sizes are supported, and the 409*5e7646d2SAndroid Build Coastguard Worker // range of sizes that are supported... 410*5e7646d2SAndroid Build Coastguard Worker // 411*5e7646d2SAndroid Build Coastguard Worker 412*5e7646d2SAndroid Build Coastguard Worker VariablePaperSize Yes 413*5e7646d2SAndroid Build Coastguard Worker MinSize 3in 5in 414*5e7646d2SAndroid Build Coastguard Worker MaxSize 13in 19in 415*5e7646d2SAndroid Build Coastguard Worker 416*5e7646d2SAndroid Build Coastguard Worker 417*5e7646d2SAndroid Build Coastguard Worker // 418*5e7646d2SAndroid Build Coastguard Worker // These imaginary printers support printing at 600 and 1200 DPI. 419*5e7646d2SAndroid Build Coastguard Worker // We'll use the new Option and Choice keywords to define the 420*5e7646d2SAndroid Build Coastguard Worker // Resolution options... 421*5e7646d2SAndroid Build Coastguard Worker // 422*5e7646d2SAndroid Build Coastguard Worker // Option option-name option-text option-type 423*5e7646d2SAndroid Build Coastguard Worker // Choice choice-name choice-text code 424*5e7646d2SAndroid Build Coastguard Worker // 425*5e7646d2SAndroid Build Coastguard Worker // "Option-type" is the type of option: boolean, pickone, or pickmany. 426*5e7646d2SAndroid Build Coastguard Worker // 427*5e7646d2SAndroid Build Coastguard Worker 428*5e7646d2SAndroid Build Coastguard Worker Option Resolution PickOne AnySetup 10 429*5e7646d2SAndroid Build Coastguard Worker Choice "600dpi/600 DPI" "<</HWResolution[600 600]/cupsBitsPerColor 8>>setpagedevice" 430*5e7646d2SAndroid Build Coastguard Worker Choice "1200dpi/1200 DPI" "<</HWResolution[1200 1200]/cupsBitsPerColor 8>>setpagedevice" 431*5e7646d2SAndroid Build Coastguard Worker 432*5e7646d2SAndroid Build Coastguard Worker 433*5e7646d2SAndroid Build Coastguard Worker // 434*5e7646d2SAndroid Build Coastguard Worker // One printer is grayscale only, and the other does grayscale 435*5e7646d2SAndroid Build Coastguard Worker // and color. Define the grayscale color model for both printers 436*5e7646d2SAndroid Build Coastguard Worker // using the new Option and Choice keywords. 437*5e7646d2SAndroid Build Coastguard Worker // 438*5e7646d2SAndroid Build Coastguard Worker 439*5e7646d2SAndroid Build Coastguard Worker Option "ColorModel/Color Mode" PickOne AnySetup 10 440*5e7646d2SAndroid Build Coastguard Worker Choice Gray/Grayscale "<</cupsColorSpace $CUPS_CSPACE_W>>setpagedevice" 441*5e7646d2SAndroid Build Coastguard Worker 442*5e7646d2SAndroid Build Coastguard Worker 443*5e7646d2SAndroid Build Coastguard Worker // 444*5e7646d2SAndroid Build Coastguard Worker // Both printers provide two paper trays, which we'll define using 445*5e7646d2SAndroid Build Coastguard Worker // the new Option and Choice keywords... 446*5e7646d2SAndroid Build Coastguard Worker // 447*5e7646d2SAndroid Build Coastguard Worker 448*5e7646d2SAndroid Build Coastguard Worker Option "InputSlot/Input Slot" PickOne AnySetup 10 449*5e7646d2SAndroid Build Coastguard Worker Choice "Upper/Main Paper Tray" "<</MediaPosition 0>>setpagedevice" 450*5e7646d2SAndroid Build Coastguard Worker Choice "LargeCapacity/Large Paper Tray" "<</MediaPosition 1>>setpagedevice" 451*5e7646d2SAndroid Build Coastguard Worker 452*5e7646d2SAndroid Build Coastguard Worker 453*5e7646d2SAndroid Build Coastguard Worker // 454*5e7646d2SAndroid Build Coastguard Worker // Both printers support duplexing... 455*5e7646d2SAndroid Build Coastguard Worker // 456*5e7646d2SAndroid Build Coastguard Worker // The Duplex keyword accepts values of "none" (no duplexing capability), 457*5e7646d2SAndroid Build Coastguard Worker // "normal" (standard duplexing capability), and "flip" (auto-duplex that 458*5e7646d2SAndroid Build Coastguard Worker // requires the back side to be flipped by the RIP...) 459*5e7646d2SAndroid Build Coastguard Worker // 460*5e7646d2SAndroid Build Coastguard Worker 461*5e7646d2SAndroid Build Coastguard Worker Duplex normal 462*5e7646d2SAndroid Build Coastguard Worker 463*5e7646d2SAndroid Build Coastguard Worker 464*5e7646d2SAndroid Build Coastguard Worker { 465*5e7646d2SAndroid Build Coastguard Worker // 466*5e7646d2SAndroid Build Coastguard Worker // The first sub-group contains the grayscale printer, which 467*5e7646d2SAndroid Build Coastguard Worker // only needs the model name, PC filename, and model number 468*5e7646d2SAndroid Build Coastguard Worker // values set... 469*5e7646d2SAndroid Build Coastguard Worker // 470*5e7646d2SAndroid Build Coastguard Worker // The ModelName keyword defines the string that is shown to 471*5e7646d2SAndroid Build Coastguard Worker // the user. 472*5e7646d2SAndroid Build Coastguard Worker // 473*5e7646d2SAndroid Build Coastguard Worker 474*5e7646d2SAndroid Build Coastguard Worker ModelName "Mono Laser Printer" 475*5e7646d2SAndroid Build Coastguard Worker 476*5e7646d2SAndroid Build Coastguard Worker 477*5e7646d2SAndroid Build Coastguard Worker // 478*5e7646d2SAndroid Build Coastguard Worker // The ModelNumber keyword defines the cupsModelNumber 479*5e7646d2SAndroid Build Coastguard Worker // attribute value. We use the "(name name)" notation 480*5e7646d2SAndroid Build Coastguard Worker // to perform a bitwise OR of the #define'd constants. 481*5e7646d2SAndroid Build Coastguard Worker // 482*5e7646d2SAndroid Build Coastguard Worker 483*5e7646d2SAndroid Build Coastguard Worker ModelNumber ($MODEL_BW $MODEL_LASER) 484*5e7646d2SAndroid Build Coastguard Worker 485*5e7646d2SAndroid Build Coastguard Worker 486*5e7646d2SAndroid Build Coastguard Worker // 487*5e7646d2SAndroid Build Coastguard Worker // The PCFileName keyword defines the filename of the PPD 488*5e7646d2SAndroid Build Coastguard Worker // file and should be 8 characters or less + the .ppd 489*5e7646d2SAndroid Build Coastguard Worker // extension. 490*5e7646d2SAndroid Build Coastguard Worker // 491*5e7646d2SAndroid Build Coastguard Worker 492*5e7646d2SAndroid Build Coastguard Worker PCFileName "fooglasr.ppd" 493*5e7646d2SAndroid Build Coastguard Worker } 494*5e7646d2SAndroid Build Coastguard Worker 495*5e7646d2SAndroid Build Coastguard Worker 496*5e7646d2SAndroid Build Coastguard Worker { 497*5e7646d2SAndroid Build Coastguard Worker // 498*5e7646d2SAndroid Build Coastguard Worker // The second sub-group contains the color printer, which 499*5e7646d2SAndroid Build Coastguard Worker // needs another ColorModel definition along with the model 500*5e7646d2SAndroid Build Coastguard Worker // name, PC filename, and model number values. 501*5e7646d2SAndroid Build Coastguard Worker // 502*5e7646d2SAndroid Build Coastguard Worker // The ModelName keyword defines the string that is shown to 503*5e7646d2SAndroid Build Coastguard Worker // the user. 504*5e7646d2SAndroid Build Coastguard Worker // 505*5e7646d2SAndroid Build Coastguard Worker 506*5e7646d2SAndroid Build Coastguard Worker ModelName "Color Laser Printer" 507*5e7646d2SAndroid Build Coastguard Worker 508*5e7646d2SAndroid Build Coastguard Worker 509*5e7646d2SAndroid Build Coastguard Worker // 510*5e7646d2SAndroid Build Coastguard Worker // The ModelNumber keyword defines the cupsModelNumber 511*5e7646d2SAndroid Build Coastguard Worker // attribute value. We use the "(name name)" notation 512*5e7646d2SAndroid Build Coastguard Worker // to perform a bitwise OR of the #define'd constants. 513*5e7646d2SAndroid Build Coastguard Worker // 514*5e7646d2SAndroid Build Coastguard Worker 515*5e7646d2SAndroid Build Coastguard Worker ModelNumber ($MODEL_COLOR $MODEL_LASER) 516*5e7646d2SAndroid Build Coastguard Worker 517*5e7646d2SAndroid Build Coastguard Worker 518*5e7646d2SAndroid Build Coastguard Worker // 519*5e7646d2SAndroid Build Coastguard Worker // The PCFileName keyword defines the filename of the PPD 520*5e7646d2SAndroid Build Coastguard Worker // file and should be 8 characters or less + the .ppd 521*5e7646d2SAndroid Build Coastguard Worker // extension. 522*5e7646d2SAndroid Build Coastguard Worker // 523*5e7646d2SAndroid Build Coastguard Worker 524*5e7646d2SAndroid Build Coastguard Worker PCFileName "fooclasr.ppd" 525*5e7646d2SAndroid Build Coastguard Worker 526*5e7646d2SAndroid Build Coastguard Worker 527*5e7646d2SAndroid Build Coastguard Worker // 528*5e7646d2SAndroid Build Coastguard Worker // This printer does color printing, too, so add it and make 529*5e7646d2SAndroid Build Coastguard Worker // RGB the default... 530*5e7646d2SAndroid Build Coastguard Worker // 531*5e7646d2SAndroid Build Coastguard Worker 532*5e7646d2SAndroid Build Coastguard Worker ColorDevice Yes 533*5e7646d2SAndroid Build Coastguard Worker 534*5e7646d2SAndroid Build Coastguard Worker Option "ColorModel/Color Mode" PickOne AnySetup 10 535*5e7646d2SAndroid Build Coastguard Worker *Choice RGB/Color "<</cupsColorSpace $CUPS_CSPACE_RGB>>setpagedevice" 536*5e7646d2SAndroid Build Coastguard Worker } 537*5e7646d2SAndroid Build Coastguard Worker} 538