1*5e7646d2SAndroid Build Coastguard Worker<!DOCTYPE html> 2*5e7646d2SAndroid Build Coastguard Worker<html> 3*5e7646d2SAndroid Build Coastguard Worker<!-- SECTION: Programming --> 4*5e7646d2SAndroid Build Coastguard Worker <head> 5*5e7646d2SAndroid Build Coastguard Worker <title>Introduction to the PPD Compiler</title> 6*5e7646d2SAndroid Build Coastguard Worker <meta name="keywords" content="Programming"> 7*5e7646d2SAndroid Build Coastguard Worker <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 8*5e7646d2SAndroid Build Coastguard Worker <meta name="creator" content="codedoc v3.1"> 9*5e7646d2SAndroid Build Coastguard Worker <meta name="author" content="Unknown"> 10*5e7646d2SAndroid Build Coastguard Worker <meta name="copyright" content="Unknown"> 11*5e7646d2SAndroid Build Coastguard Worker <meta name="version" content="0.0"> 12*5e7646d2SAndroid Build Coastguard Worker <style type="text/css"><!-- 13*5e7646d2SAndroid Build Coastguard WorkerBODY { 14*5e7646d2SAndroid Build Coastguard Worker font-family: lucida grande, geneva, helvetica, arial, sans-serif; 15*5e7646d2SAndroid Build Coastguard Worker} 16*5e7646d2SAndroid Build Coastguard Worker 17*5e7646d2SAndroid Build Coastguard WorkerH1, H2, H3, H4, H5, H6, P, TD, TH { 18*5e7646d2SAndroid Build Coastguard Worker font-family: lucida grande, geneva, helvetica, arial, sans-serif; 19*5e7646d2SAndroid Build Coastguard Worker} 20*5e7646d2SAndroid Build Coastguard Worker 21*5e7646d2SAndroid Build Coastguard WorkerH1 { font-size: 2em; } 22*5e7646d2SAndroid Build Coastguard WorkerH2 { font-size: 1.75em; } 23*5e7646d2SAndroid Build Coastguard WorkerH3 { font-size: 1.5em; } 24*5e7646d2SAndroid Build Coastguard WorkerH4 { font-size: 1.25em; } 25*5e7646d2SAndroid Build Coastguard Worker 26*5e7646d2SAndroid Build Coastguard WorkerKBD { 27*5e7646d2SAndroid Build Coastguard Worker font-family: monaco, courier, monospace; 28*5e7646d2SAndroid Build Coastguard Worker font-weight: bold; 29*5e7646d2SAndroid Build Coastguard Worker} 30*5e7646d2SAndroid Build Coastguard Worker 31*5e7646d2SAndroid Build Coastguard WorkerPRE { 32*5e7646d2SAndroid Build Coastguard Worker font-family: monaco, courier, monospace; 33*5e7646d2SAndroid Build Coastguard Worker} 34*5e7646d2SAndroid Build Coastguard Worker 35*5e7646d2SAndroid Build Coastguard WorkerBLOCKQUOTE { 36*5e7646d2SAndroid Build Coastguard Worker border-left: solid 2px #777; 37*5e7646d2SAndroid Build Coastguard Worker margin: 1em 0; 38*5e7646d2SAndroid Build Coastguard Worker padding: 10px; 39*5e7646d2SAndroid Build Coastguard Worker} 40*5e7646d2SAndroid Build Coastguard Worker 41*5e7646d2SAndroid Build Coastguard WorkerBLOCKQUOTE OL LI { 42*5e7646d2SAndroid Build Coastguard Worker margin-left: -1em; 43*5e7646d2SAndroid Build Coastguard Worker} 44*5e7646d2SAndroid Build Coastguard Worker 45*5e7646d2SAndroid Build Coastguard WorkerPRE.command, PRE.example { 46*5e7646d2SAndroid Build Coastguard Worker background: #eee; 47*5e7646d2SAndroid Build Coastguard Worker margin: 0 36pt; 48*5e7646d2SAndroid Build Coastguard Worker padding: 10px; 49*5e7646d2SAndroid Build Coastguard Worker} 50*5e7646d2SAndroid Build Coastguard Worker 51*5e7646d2SAndroid Build Coastguard WorkerP.compact { 52*5e7646d2SAndroid Build Coastguard Worker margin: 0; 53*5e7646d2SAndroid Build Coastguard Worker} 54*5e7646d2SAndroid Build Coastguard Worker 55*5e7646d2SAndroid Build Coastguard WorkerP.example { 56*5e7646d2SAndroid Build Coastguard Worker font-style: italic; 57*5e7646d2SAndroid Build Coastguard Worker margin-left: 36pt; 58*5e7646d2SAndroid Build Coastguard Worker} 59*5e7646d2SAndroid Build Coastguard Worker 60*5e7646d2SAndroid Build Coastguard WorkerDL.man DD { 61*5e7646d2SAndroid Build Coastguard Worker margin-left: 5em; 62*5e7646d2SAndroid Build Coastguard Worker} 63*5e7646d2SAndroid Build Coastguard Worker 64*5e7646d2SAndroid Build Coastguard WorkerDL.man DT { 65*5e7646d2SAndroid Build Coastguard Worker margin-left: 0; 66*5e7646d2SAndroid Build Coastguard Worker} 67*5e7646d2SAndroid Build Coastguard Worker 68*5e7646d2SAndroid Build Coastguard WorkerPRE.man { 69*5e7646d2SAndroid Build Coastguard Worker margin: 0; 70*5e7646d2SAndroid Build Coastguard Worker} 71*5e7646d2SAndroid Build Coastguard Worker 72*5e7646d2SAndroid Build Coastguard WorkerPRE.command EM, PRE.example EM { 73*5e7646d2SAndroid Build Coastguard Worker font-family: lucida grande, geneva, helvetica, arial, sans-serif; 74*5e7646d2SAndroid Build Coastguard Worker} 75*5e7646d2SAndroid Build Coastguard Worker 76*5e7646d2SAndroid Build Coastguard WorkerP.command { 77*5e7646d2SAndroid Build Coastguard Worker font-family: monaco, courier, monospace; 78*5e7646d2SAndroid Build Coastguard Worker margin-left: 36pt; 79*5e7646d2SAndroid Build Coastguard Worker} 80*5e7646d2SAndroid Build Coastguard Worker 81*5e7646d2SAndroid Build Coastguard WorkerP.formula { 82*5e7646d2SAndroid Build Coastguard Worker font-style: italic; 83*5e7646d2SAndroid Build Coastguard Worker margin-left: 36pt; 84*5e7646d2SAndroid Build Coastguard Worker} 85*5e7646d2SAndroid Build Coastguard Worker 86*5e7646d2SAndroid Build Coastguard WorkerA IMG { 87*5e7646d2SAndroid Build Coastguard Worker border: none; 88*5e7646d2SAndroid Build Coastguard Worker} 89*5e7646d2SAndroid Build Coastguard Worker 90*5e7646d2SAndroid Build Coastguard WorkerA:link:hover IMG { 91*5e7646d2SAndroid Build Coastguard Worker background: #f0f0f0; 92*5e7646d2SAndroid Build Coastguard Worker border-radius: 10px; 93*5e7646d2SAndroid Build Coastguard Worker -moz-border-radius: 10px; 94*5e7646d2SAndroid Build Coastguard Worker} 95*5e7646d2SAndroid Build Coastguard Worker 96*5e7646d2SAndroid Build Coastguard WorkerA:link, A:visited { 97*5e7646d2SAndroid Build Coastguard Worker font-weight: inherit; 98*5e7646d2SAndroid Build Coastguard Worker text-decoration: none; 99*5e7646d2SAndroid Build Coastguard Worker} 100*5e7646d2SAndroid Build Coastguard Worker 101*5e7646d2SAndroid Build Coastguard WorkerA:link:hover, A:visited:hover, A:active { 102*5e7646d2SAndroid Build Coastguard Worker text-decoration: underline; 103*5e7646d2SAndroid Build Coastguard Worker} 104*5e7646d2SAndroid Build Coastguard Worker 105*5e7646d2SAndroid Build Coastguard WorkerSUB, SUP { 106*5e7646d2SAndroid Build Coastguard Worker font-size: 50%; 107*5e7646d2SAndroid Build Coastguard Worker} 108*5e7646d2SAndroid Build Coastguard Worker 109*5e7646d2SAndroid Build Coastguard WorkerTR.data, TD.data, TR.data TD { 110*5e7646d2SAndroid Build Coastguard Worker margin-top: 10pt; 111*5e7646d2SAndroid Build Coastguard Worker padding: 5pt; 112*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 1pt #999999; 113*5e7646d2SAndroid Build Coastguard Worker} 114*5e7646d2SAndroid Build Coastguard Worker 115*5e7646d2SAndroid Build Coastguard WorkerTR.data TH { 116*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 1pt #999999; 117*5e7646d2SAndroid Build Coastguard Worker padding-top: 10pt; 118*5e7646d2SAndroid Build Coastguard Worker padding-left: 5pt; 119*5e7646d2SAndroid Build Coastguard Worker text-align: left; 120*5e7646d2SAndroid Build Coastguard Worker} 121*5e7646d2SAndroid Build Coastguard Worker 122*5e7646d2SAndroid Build Coastguard WorkerDIV.table TABLE { 123*5e7646d2SAndroid Build Coastguard Worker border: solid thin #999999; 124*5e7646d2SAndroid Build Coastguard Worker border-collapse: collapse; 125*5e7646d2SAndroid Build Coastguard Worker border-spacing: 0; 126*5e7646d2SAndroid Build Coastguard Worker margin-left: auto; 127*5e7646d2SAndroid Build Coastguard Worker margin-right: auto; 128*5e7646d2SAndroid Build Coastguard Worker} 129*5e7646d2SAndroid Build Coastguard Worker 130*5e7646d2SAndroid Build Coastguard WorkerDIV.table CAPTION { 131*5e7646d2SAndroid Build Coastguard Worker caption-side: top; 132*5e7646d2SAndroid Build Coastguard Worker font-size: 120%; 133*5e7646d2SAndroid Build Coastguard Worker font-style: italic; 134*5e7646d2SAndroid Build Coastguard Worker font-weight: bold; 135*5e7646d2SAndroid Build Coastguard Worker margin-left: auto; 136*5e7646d2SAndroid Build Coastguard Worker margin-right: auto; 137*5e7646d2SAndroid Build Coastguard Worker} 138*5e7646d2SAndroid Build Coastguard Worker 139*5e7646d2SAndroid Build Coastguard WorkerDIV.table TABLE TD { 140*5e7646d2SAndroid Build Coastguard Worker border: solid thin #cccccc; 141*5e7646d2SAndroid Build Coastguard Worker padding: 5pt 10pt 0; 142*5e7646d2SAndroid Build Coastguard Worker} 143*5e7646d2SAndroid Build Coastguard Worker 144*5e7646d2SAndroid Build Coastguard WorkerDIV.table TABLE TH { 145*5e7646d2SAndroid Build Coastguard Worker background: #cccccc; 146*5e7646d2SAndroid Build Coastguard Worker border: none; 147*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid thin #999999; 148*5e7646d2SAndroid Build Coastguard Worker} 149*5e7646d2SAndroid Build Coastguard Worker 150*5e7646d2SAndroid Build Coastguard WorkerDIV.figure TABLE { 151*5e7646d2SAndroid Build Coastguard Worker margin-left: auto; 152*5e7646d2SAndroid Build Coastguard Worker margin-right: auto; 153*5e7646d2SAndroid Build Coastguard Worker} 154*5e7646d2SAndroid Build Coastguard Worker 155*5e7646d2SAndroid Build Coastguard WorkerDIV.figure CAPTION { 156*5e7646d2SAndroid Build Coastguard Worker caption-side: bottom; 157*5e7646d2SAndroid Build Coastguard Worker font-size: 120%; 158*5e7646d2SAndroid Build Coastguard Worker font-style: italic; 159*5e7646d2SAndroid Build Coastguard Worker font-weight: bold; 160*5e7646d2SAndroid Build Coastguard Worker margin-left: auto; 161*5e7646d2SAndroid Build Coastguard Worker margin-right: auto; 162*5e7646d2SAndroid Build Coastguard Worker} 163*5e7646d2SAndroid Build Coastguard Worker 164*5e7646d2SAndroid Build Coastguard WorkerTH.label { 165*5e7646d2SAndroid Build Coastguard Worker text-align: right; 166*5e7646d2SAndroid Build Coastguard Worker vertical-align: top; 167*5e7646d2SAndroid Build Coastguard Worker} 168*5e7646d2SAndroid Build Coastguard Worker 169*5e7646d2SAndroid Build Coastguard WorkerTH.sublabel { 170*5e7646d2SAndroid Build Coastguard Worker text-align: right; 171*5e7646d2SAndroid Build Coastguard Worker font-weight: normal; 172*5e7646d2SAndroid Build Coastguard Worker} 173*5e7646d2SAndroid Build Coastguard Worker 174*5e7646d2SAndroid Build Coastguard WorkerHR { 175*5e7646d2SAndroid Build Coastguard Worker border: solid thin; 176*5e7646d2SAndroid Build Coastguard Worker} 177*5e7646d2SAndroid Build Coastguard Worker 178*5e7646d2SAndroid Build Coastguard WorkerSPAN.info { 179*5e7646d2SAndroid Build Coastguard Worker background: black; 180*5e7646d2SAndroid Build Coastguard Worker border: thin solid black; 181*5e7646d2SAndroid Build Coastguard Worker color: white; 182*5e7646d2SAndroid Build Coastguard Worker font-size: 80%; 183*5e7646d2SAndroid Build Coastguard Worker font-style: italic; 184*5e7646d2SAndroid Build Coastguard Worker font-weight: bold; 185*5e7646d2SAndroid Build Coastguard Worker white-space: nowrap; 186*5e7646d2SAndroid Build Coastguard Worker} 187*5e7646d2SAndroid Build Coastguard Worker 188*5e7646d2SAndroid Build Coastguard WorkerH2 SPAN.info, H3 SPAN.info, H4 SPAN.info { 189*5e7646d2SAndroid Build Coastguard Worker float: right; 190*5e7646d2SAndroid Build Coastguard Worker font-size: 100%; 191*5e7646d2SAndroid Build Coastguard Worker} 192*5e7646d2SAndroid Build Coastguard Worker 193*5e7646d2SAndroid Build Coastguard WorkerH1.title { 194*5e7646d2SAndroid Build Coastguard Worker} 195*5e7646d2SAndroid Build Coastguard Worker 196*5e7646d2SAndroid Build Coastguard WorkerH2.title, H3.title { 197*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 2pt #000000; 198*5e7646d2SAndroid Build Coastguard Worker} 199*5e7646d2SAndroid Build Coastguard Worker 200*5e7646d2SAndroid Build Coastguard WorkerDIV.indent, TABLE.indent { 201*5e7646d2SAndroid Build Coastguard Worker margin-top: 2em; 202*5e7646d2SAndroid Build Coastguard Worker margin-left: auto; 203*5e7646d2SAndroid Build Coastguard Worker margin-right: auto; 204*5e7646d2SAndroid Build Coastguard Worker width: 90%; 205*5e7646d2SAndroid Build Coastguard Worker} 206*5e7646d2SAndroid Build Coastguard Worker 207*5e7646d2SAndroid Build Coastguard WorkerTABLE.indent { 208*5e7646d2SAndroid Build Coastguard Worker border-collapse: collapse; 209*5e7646d2SAndroid Build Coastguard Worker} 210*5e7646d2SAndroid Build Coastguard Worker 211*5e7646d2SAndroid Build Coastguard WorkerTABLE.indent TD, TABLE.indent TH { 212*5e7646d2SAndroid Build Coastguard Worker padding: 0; 213*5e7646d2SAndroid Build Coastguard Worker} 214*5e7646d2SAndroid Build Coastguard Worker 215*5e7646d2SAndroid Build Coastguard WorkerTABLE.list { 216*5e7646d2SAndroid Build Coastguard Worker border-collapse: collapse; 217*5e7646d2SAndroid Build Coastguard Worker margin-left: auto; 218*5e7646d2SAndroid Build Coastguard Worker margin-right: auto; 219*5e7646d2SAndroid Build Coastguard Worker width: 90%; 220*5e7646d2SAndroid Build Coastguard Worker} 221*5e7646d2SAndroid Build Coastguard Worker 222*5e7646d2SAndroid Build Coastguard WorkerTABLE.list TH { 223*5e7646d2SAndroid Build Coastguard Worker background: white; 224*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid thin #cccccc; 225*5e7646d2SAndroid Build Coastguard Worker color: #444444; 226*5e7646d2SAndroid Build Coastguard Worker padding-top: 10pt; 227*5e7646d2SAndroid Build Coastguard Worker padding-left: 5pt; 228*5e7646d2SAndroid Build Coastguard Worker text-align: left; 229*5e7646d2SAndroid Build Coastguard Worker vertical-align: bottom; 230*5e7646d2SAndroid Build Coastguard Worker white-space: nowrap; 231*5e7646d2SAndroid Build Coastguard Worker} 232*5e7646d2SAndroid Build Coastguard Worker 233*5e7646d2SAndroid Build Coastguard WorkerTABLE.list TH A { 234*5e7646d2SAndroid Build Coastguard Worker color: #4444cc; 235*5e7646d2SAndroid Build Coastguard Worker} 236*5e7646d2SAndroid Build Coastguard Worker 237*5e7646d2SAndroid Build Coastguard WorkerTABLE.list TD { 238*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid thin #eeeeee; 239*5e7646d2SAndroid Build Coastguard Worker padding-top: 5pt; 240*5e7646d2SAndroid Build Coastguard Worker padding-left: 5pt; 241*5e7646d2SAndroid Build Coastguard Worker} 242*5e7646d2SAndroid Build Coastguard Worker 243*5e7646d2SAndroid Build Coastguard WorkerTABLE.list TR:nth-child(even) { 244*5e7646d2SAndroid Build Coastguard Worker background: #f8f8f8; 245*5e7646d2SAndroid Build Coastguard Worker} 246*5e7646d2SAndroid Build Coastguard Worker 247*5e7646d2SAndroid Build Coastguard WorkerTABLE.list TR:nth-child(odd) { 248*5e7646d2SAndroid Build Coastguard Worker background: #f4f4f4; 249*5e7646d2SAndroid Build Coastguard Worker} 250*5e7646d2SAndroid Build Coastguard Worker 251*5e7646d2SAndroid Build Coastguard WorkerDT { 252*5e7646d2SAndroid Build Coastguard Worker margin-left: 36pt; 253*5e7646d2SAndroid Build Coastguard Worker margin-top: 12pt; 254*5e7646d2SAndroid Build Coastguard Worker} 255*5e7646d2SAndroid Build Coastguard Worker 256*5e7646d2SAndroid Build Coastguard WorkerDD { 257*5e7646d2SAndroid Build Coastguard Worker margin-left: 54pt; 258*5e7646d2SAndroid Build Coastguard Worker} 259*5e7646d2SAndroid Build Coastguard Worker 260*5e7646d2SAndroid Build Coastguard WorkerDL.category DT { 261*5e7646d2SAndroid Build Coastguard Worker font-weight: bold; 262*5e7646d2SAndroid Build Coastguard Worker} 263*5e7646d2SAndroid Build Coastguard Worker 264*5e7646d2SAndroid Build Coastguard WorkerP.summary { 265*5e7646d2SAndroid Build Coastguard Worker margin-left: 36pt; 266*5e7646d2SAndroid Build Coastguard Worker font-family: monaco, courier, monospace; 267*5e7646d2SAndroid Build Coastguard Worker} 268*5e7646d2SAndroid Build Coastguard Worker 269*5e7646d2SAndroid Build Coastguard WorkerDIV.summary TABLE { 270*5e7646d2SAndroid Build Coastguard Worker border: solid thin #999999; 271*5e7646d2SAndroid Build Coastguard Worker border-collapse: collapse; 272*5e7646d2SAndroid Build Coastguard Worker border-spacing: 0; 273*5e7646d2SAndroid Build Coastguard Worker margin: 10px; 274*5e7646d2SAndroid Build Coastguard Worker} 275*5e7646d2SAndroid Build Coastguard Worker 276*5e7646d2SAndroid Build Coastguard WorkerDIV.summary TABLE TD, DIV.summary TABLE TH { 277*5e7646d2SAndroid Build Coastguard Worker border: solid thin #999999; 278*5e7646d2SAndroid Build Coastguard Worker padding: 5px; 279*5e7646d2SAndroid Build Coastguard Worker text-align: left; 280*5e7646d2SAndroid Build Coastguard Worker vertical-align: top; 281*5e7646d2SAndroid Build Coastguard Worker} 282*5e7646d2SAndroid Build Coastguard Worker 283*5e7646d2SAndroid Build Coastguard WorkerDIV.summary TABLE THEAD TH { 284*5e7646d2SAndroid Build Coastguard Worker background: #eeeeee; 285*5e7646d2SAndroid Build Coastguard Worker} 286*5e7646d2SAndroid Build Coastguard Worker 287*5e7646d2SAndroid Build Coastguard Worker/* API documentation styles... */ 288*5e7646d2SAndroid Build Coastguard Workerdiv.body h1 { 289*5e7646d2SAndroid Build Coastguard Worker font-size: 250%; 290*5e7646d2SAndroid Build Coastguard Worker font-weight: bold; 291*5e7646d2SAndroid Build Coastguard Worker margin: 0; 292*5e7646d2SAndroid Build Coastguard Worker} 293*5e7646d2SAndroid Build Coastguard Workerdiv.body h2 { 294*5e7646d2SAndroid Build Coastguard Worker font-size: 250%; 295*5e7646d2SAndroid Build Coastguard Worker margin-top: 1.5em; 296*5e7646d2SAndroid Build Coastguard Worker} 297*5e7646d2SAndroid Build Coastguard Workerdiv.body h3 { 298*5e7646d2SAndroid Build Coastguard Worker font-size: 150%; 299*5e7646d2SAndroid Build Coastguard Worker margin-bottom: 0.5em; 300*5e7646d2SAndroid Build Coastguard Worker margin-top: 1.5em; 301*5e7646d2SAndroid Build Coastguard Worker} 302*5e7646d2SAndroid Build Coastguard Workerdiv.body h4 { 303*5e7646d2SAndroid Build Coastguard Worker font-size: 110%; 304*5e7646d2SAndroid Build Coastguard Worker margin-bottom: 0.5em; 305*5e7646d2SAndroid Build Coastguard Worker margin-top: 1.5em; 306*5e7646d2SAndroid Build Coastguard Worker} 307*5e7646d2SAndroid Build Coastguard Workerdiv.body h5 { 308*5e7646d2SAndroid Build Coastguard Worker font-size: 100%; 309*5e7646d2SAndroid Build Coastguard Worker margin-bottom: 0.5em; 310*5e7646d2SAndroid Build Coastguard Worker margin-top: 1.5em; 311*5e7646d2SAndroid Build Coastguard Worker} 312*5e7646d2SAndroid Build Coastguard Workerdiv.contents { 313*5e7646d2SAndroid Build Coastguard Worker background: #e8e8e8; 314*5e7646d2SAndroid Build Coastguard Worker border: solid thin black; 315*5e7646d2SAndroid Build Coastguard Worker padding: 10px; 316*5e7646d2SAndroid Build Coastguard Worker} 317*5e7646d2SAndroid Build Coastguard Workerdiv.contents h1 { 318*5e7646d2SAndroid Build Coastguard Worker font-size: 110%; 319*5e7646d2SAndroid Build Coastguard Worker} 320*5e7646d2SAndroid Build Coastguard Workerdiv.contents h2 { 321*5e7646d2SAndroid Build Coastguard Worker font-size: 100%; 322*5e7646d2SAndroid Build Coastguard Worker} 323*5e7646d2SAndroid Build Coastguard Workerdiv.contents ul.contents { 324*5e7646d2SAndroid Build Coastguard Worker font-size: 80%; 325*5e7646d2SAndroid Build Coastguard Worker} 326*5e7646d2SAndroid Build Coastguard Worker.class { 327*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 2px gray; 328*5e7646d2SAndroid Build Coastguard Worker} 329*5e7646d2SAndroid Build Coastguard Worker.constants { 330*5e7646d2SAndroid Build Coastguard Worker} 331*5e7646d2SAndroid Build Coastguard Worker.description { 332*5e7646d2SAndroid Build Coastguard Worker margin-top: 0.5em; 333*5e7646d2SAndroid Build Coastguard Worker} 334*5e7646d2SAndroid Build Coastguard Worker.discussion { 335*5e7646d2SAndroid Build Coastguard Worker} 336*5e7646d2SAndroid Build Coastguard Worker.enumeration { 337*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 2px gray; 338*5e7646d2SAndroid Build Coastguard Worker} 339*5e7646d2SAndroid Build Coastguard Worker.function { 340*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 2px gray; 341*5e7646d2SAndroid Build Coastguard Worker margin-bottom: 0; 342*5e7646d2SAndroid Build Coastguard Worker} 343*5e7646d2SAndroid Build Coastguard Worker.members { 344*5e7646d2SAndroid Build Coastguard Worker} 345*5e7646d2SAndroid Build Coastguard Worker.method { 346*5e7646d2SAndroid Build Coastguard Worker} 347*5e7646d2SAndroid Build Coastguard Worker.parameters { 348*5e7646d2SAndroid Build Coastguard Worker} 349*5e7646d2SAndroid Build Coastguard Worker.returnvalue { 350*5e7646d2SAndroid Build Coastguard Worker} 351*5e7646d2SAndroid Build Coastguard Worker.struct { 352*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 2px gray; 353*5e7646d2SAndroid Build Coastguard Worker} 354*5e7646d2SAndroid Build Coastguard Worker.typedef { 355*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 2px gray; 356*5e7646d2SAndroid Build Coastguard Worker} 357*5e7646d2SAndroid Build Coastguard Worker.union { 358*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 2px gray; 359*5e7646d2SAndroid Build Coastguard Worker} 360*5e7646d2SAndroid Build Coastguard Worker.variable { 361*5e7646d2SAndroid Build Coastguard Worker} 362*5e7646d2SAndroid Build Coastguard Workerh1, h2, h3, h4, h5, h6 { 363*5e7646d2SAndroid Build Coastguard Worker page-break-inside: avoid; 364*5e7646d2SAndroid Build Coastguard Worker} 365*5e7646d2SAndroid Build Coastguard Workerblockquote { 366*5e7646d2SAndroid Build Coastguard Worker border: solid thin gray; 367*5e7646d2SAndroid Build Coastguard Worker box-shadow: 3px 3px 5px rgba(0,0,0,0.5); 368*5e7646d2SAndroid Build Coastguard Worker padding: 10px 10px 0px; 369*5e7646d2SAndroid Build Coastguard Worker page-break-inside: avoid; 370*5e7646d2SAndroid Build Coastguard Worker} 371*5e7646d2SAndroid Build Coastguard Workerp code, li code, p.code, pre, ul.code li { 372*5e7646d2SAndroid Build Coastguard Worker background: rgba(127,127,127,0.1); 373*5e7646d2SAndroid Build Coastguard Worker border: thin dotted gray; 374*5e7646d2SAndroid Build Coastguard Worker font-family: monospace; 375*5e7646d2SAndroid Build Coastguard Worker hyphens: manual; 376*5e7646d2SAndroid Build Coastguard Worker -webkit-hyphens: manual; 377*5e7646d2SAndroid Build Coastguard Worker page-break-inside: avoid; 378*5e7646d2SAndroid Build Coastguard Worker} 379*5e7646d2SAndroid Build Coastguard Workerp.code, pre, ul.code li { 380*5e7646d2SAndroid Build Coastguard Worker padding: 10px; 381*5e7646d2SAndroid Build Coastguard Worker} 382*5e7646d2SAndroid Build Coastguard Workerp code, li code { 383*5e7646d2SAndroid Build Coastguard Worker padding: 2px 5px; 384*5e7646d2SAndroid Build Coastguard Worker} 385*5e7646d2SAndroid Build Coastguard Workera:link, a:visited { 386*5e7646d2SAndroid Build Coastguard Worker text-decoration: none; 387*5e7646d2SAndroid Build Coastguard Worker} 388*5e7646d2SAndroid Build Coastguard Workerspan.info { 389*5e7646d2SAndroid Build Coastguard Worker background: black; 390*5e7646d2SAndroid Build Coastguard Worker border: solid thin black; 391*5e7646d2SAndroid Build Coastguard Worker color: white; 392*5e7646d2SAndroid Build Coastguard Worker font-size: 80%; 393*5e7646d2SAndroid Build Coastguard Worker font-style: italic; 394*5e7646d2SAndroid Build Coastguard Worker font-weight: bold; 395*5e7646d2SAndroid Build Coastguard Worker white-space: nowrap; 396*5e7646d2SAndroid Build Coastguard Worker} 397*5e7646d2SAndroid Build Coastguard Workerh2 span.info, h3 span.info, h4 span.info { 398*5e7646d2SAndroid Build Coastguard Worker border-radius: 10px; 399*5e7646d2SAndroid Build Coastguard Worker float: right; 400*5e7646d2SAndroid Build Coastguard Worker font-size: 80%; 401*5e7646d2SAndroid Build Coastguard Worker padding: 3px 6px; 402*5e7646d2SAndroid Build Coastguard Worker} 403*5e7646d2SAndroid Build Coastguard Workerh2.title span.info, h3.title span.info, h4.title span.info { 404*5e7646d2SAndroid Build Coastguard Worker border-bottom-left-radius: 0px; 405*5e7646d2SAndroid Build Coastguard Worker border-bottom-right-radius: 0px; 406*5e7646d2SAndroid Build Coastguard Worker} 407*5e7646d2SAndroid Build Coastguard Workerh2.title span.info { 408*5e7646d2SAndroid Build Coastguard Worker padding: 4px 6px; 409*5e7646d2SAndroid Build Coastguard Worker} 410*5e7646d2SAndroid Build Coastguard Workerul.code, ul.contents, ul.subcontents { 411*5e7646d2SAndroid Build Coastguard Worker list-style-type: none; 412*5e7646d2SAndroid Build Coastguard Worker margin: 0; 413*5e7646d2SAndroid Build Coastguard Worker padding-left: 0; 414*5e7646d2SAndroid Build Coastguard Worker} 415*5e7646d2SAndroid Build Coastguard Workerul.code li { 416*5e7646d2SAndroid Build Coastguard Worker margin: 0; 417*5e7646d2SAndroid Build Coastguard Worker} 418*5e7646d2SAndroid Build Coastguard Workerul.contents > li { 419*5e7646d2SAndroid Build Coastguard Worker margin-top: 1em; 420*5e7646d2SAndroid Build Coastguard Worker} 421*5e7646d2SAndroid Build Coastguard Workerul.contents li ul.code, ul.contents li ul.subcontents { 422*5e7646d2SAndroid Build Coastguard Worker padding-left: 2em; 423*5e7646d2SAndroid Build Coastguard Worker} 424*5e7646d2SAndroid Build Coastguard Workertable.list { 425*5e7646d2SAndroid Build Coastguard Worker border-collapse: collapse; 426*5e7646d2SAndroid Build Coastguard Worker width: 100%; 427*5e7646d2SAndroid Build Coastguard Worker} 428*5e7646d2SAndroid Build Coastguard Workertable.list tr:nth-child(even) { 429*5e7646d2SAndroid Build Coastguard Worker background: rgba(127,127,127,0.1);]n} 430*5e7646d2SAndroid Build Coastguard Workertable.list th { 431*5e7646d2SAndroid Build Coastguard Worker border-right: 2px solid gray; 432*5e7646d2SAndroid Build Coastguard Worker font-family: monospace; 433*5e7646d2SAndroid Build Coastguard Worker padding: 5px 10px 5px 2px; 434*5e7646d2SAndroid Build Coastguard Worker text-align: right; 435*5e7646d2SAndroid Build Coastguard Worker vertical-align: top; 436*5e7646d2SAndroid Build Coastguard Worker} 437*5e7646d2SAndroid Build Coastguard Workertable.list td { 438*5e7646d2SAndroid Build Coastguard Worker padding: 5px 2px 5px 10px; 439*5e7646d2SAndroid Build Coastguard Worker text-align: left; 440*5e7646d2SAndroid Build Coastguard Worker vertical-align: top; 441*5e7646d2SAndroid Build Coastguard Worker} 442*5e7646d2SAndroid Build Coastguard Workerh1.title { 443*5e7646d2SAndroid Build Coastguard Worker} 444*5e7646d2SAndroid Build Coastguard Workerh2.title { 445*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 2px black; 446*5e7646d2SAndroid Build Coastguard Worker} 447*5e7646d2SAndroid Build Coastguard Workerh3.title { 448*5e7646d2SAndroid Build Coastguard Worker border-bottom: solid 2px black; 449*5e7646d2SAndroid Build Coastguard Worker} 450*5e7646d2SAndroid Build Coastguard Worker--></style> 451*5e7646d2SAndroid Build Coastguard Worker </head> 452*5e7646d2SAndroid Build Coastguard Worker <body> 453*5e7646d2SAndroid Build Coastguard Worker<!-- 454*5e7646d2SAndroid Build Coastguard Worker PPD compiler documentation for CUPS. 455*5e7646d2SAndroid Build Coastguard Worker 456*5e7646d2SAndroid Build Coastguard Worker Copyright © 2007-2012 by Apple Inc. 457*5e7646d2SAndroid Build Coastguard Worker Copyright © 1997-2007 by Easy Software Products. 458*5e7646d2SAndroid Build Coastguard Worker 459*5e7646d2SAndroid Build Coastguard Worker Licensed under Apache License v2.0. See the file "LICENSE" for more 460*5e7646d2SAndroid Build Coastguard Worker information. 461*5e7646d2SAndroid Build Coastguard Worker--> 462*5e7646d2SAndroid Build Coastguard Worker 463*5e7646d2SAndroid Build Coastguard Worker<h1 class='title'>Introduction to the PPD Compiler</h1> 464*5e7646d2SAndroid Build Coastguard Worker 465*5e7646d2SAndroid Build Coastguard Worker<P>This document describes how to use the CUPS PostScript Printer Description 466*5e7646d2SAndroid Build Coastguard Worker(PPD) file compiler. The PPD compiler generates PPD files from simple text files 467*5e7646d2SAndroid Build Coastguard Workerthat describe the features and capabilities of one or more printers.</P> 468*5e7646d2SAndroid Build Coastguard Worker 469*5e7646d2SAndroid Build Coastguard Worker<BLOCKQUOTE><B>Note:</B> 470*5e7646d2SAndroid Build Coastguard Worker 471*5e7646d2SAndroid Build Coastguard Worker<P>The PPD compiler and related tools are deprecated and will be removed in a future release of CUPS.</P> 472*5e7646d2SAndroid Build Coastguard Worker 473*5e7646d2SAndroid Build Coastguard Worker</BLOCKQUOTE> 474*5e7646d2SAndroid Build Coastguard Worker 475*5e7646d2SAndroid Build Coastguard Worker<div class='summary'><table summary='General Information'> 476*5e7646d2SAndroid Build Coastguard Worker<tbody> 477*5e7646d2SAndroid Build Coastguard Worker<tr> 478*5e7646d2SAndroid Build Coastguard Worker <th>See Also</th> 479*5e7646d2SAndroid Build Coastguard Worker <td>Programming: <a href='raster-driver.html'>Developing Raster Printer Drivers</a><br> 480*5e7646d2SAndroid Build Coastguard Worker Programming: <a href='postscript-driver.html'>Developing PostScript Printer Drivers</a><br> 481*5e7646d2SAndroid Build Coastguard Worker Programming: <a href='api-filter.html'>Filter and Backend Programming</a><br> 482*5e7646d2SAndroid Build Coastguard Worker Programming: <a href='api-raster.html'>Raster API</a><br> 483*5e7646d2SAndroid Build Coastguard Worker References: <a href='ref-ppdcfile.html'>PPD Compiler Driver Information File Reference</a><br> 484*5e7646d2SAndroid Build Coastguard Worker Specifications: <a href='spec-ppd.html'>CUPS PPD Extensions</a></td> 485*5e7646d2SAndroid Build Coastguard Worker</tr> 486*5e7646d2SAndroid Build Coastguard Worker</tbody> 487*5e7646d2SAndroid Build Coastguard Worker</table></div> 488*5e7646d2SAndroid Build Coastguard Worker <div class="contents"> 489*5e7646d2SAndroid Build Coastguard Worker <h2 class="title">Contents</h2> 490*5e7646d2SAndroid Build Coastguard Worker <ul class="contents"> 491*5e7646d2SAndroid Build Coastguard Worker <li><a href="#BASICS">The Basics</a></li> 492*5e7646d2SAndroid Build Coastguard Worker <li><a href="#DRV">Driver Information Files</a><ul class="subcontents"> 493*5e7646d2SAndroid Build Coastguard Worker <li><a href="#SIMPLE">A Simple Example</a></li> 494*5e7646d2SAndroid Build Coastguard Worker <li><a href="#GROUPING">Grouping and Inheritance</a></li> 495*5e7646d2SAndroid Build Coastguard Worker <li><a href="#COLOR">Color Support</a></li> 496*5e7646d2SAndroid Build Coastguard Worker <li><a href="#OPTIONS">Defining Custom Options and Option Groups</a></li> 497*5e7646d2SAndroid Build Coastguard Worker <li><a href="#DEFINE">Defining Constants</a></li> 498*5e7646d2SAndroid Build Coastguard Worker <li><a href="#CONDITIONAL">Conditional Statements</a></li> 499*5e7646d2SAndroid Build Coastguard Worker <li><a href="#CONSTRAINTS">Defining Constraints</a></li> 500*5e7646d2SAndroid Build Coastguard Worker </ul></li> 501*5e7646d2SAndroid Build Coastguard Worker <li><a href="#LOCALIZATION">Localization</a><ul class="subcontents"> 502*5e7646d2SAndroid Build Coastguard Worker <li><a href="#PPDPO">The ppdpo Utility</a></li> 503*5e7646d2SAndroid Build Coastguard Worker <li><a href="#PPDC_CATALOG">Using Message Catalogs with the PPD Compiler</a></li> 504*5e7646d2SAndroid Build Coastguard Worker </ul></li> 505*5e7646d2SAndroid Build Coastguard Worker </ul> 506*5e7646d2SAndroid Build Coastguard Worker </div> 507*5e7646d2SAndroid Build Coastguard Worker <div class="body"> 508*5e7646d2SAndroid Build Coastguard Worker<h2 class='title'><a name='BASICS'>The Basics</a></h2> 509*5e7646d2SAndroid Build Coastguard Worker 510*5e7646d2SAndroid Build Coastguard Worker<P>The PPD compiler, <a href='man-ppdc.html'><code>ppdc(1)</code></a>, is a 511*5e7646d2SAndroid Build Coastguard Workersimple command-line tool that takes a single <I>driver information file</I>, 512*5e7646d2SAndroid Build Coastguard Workerwhich by convention uses the extension <VAR>.drv</VAR>, and produces one or more 513*5e7646d2SAndroid Build Coastguard WorkerPPD files that may be distributed with your printer drivers for use with CUPS. 514*5e7646d2SAndroid Build Coastguard WorkerFor example, you would run the following command to create the English language 515*5e7646d2SAndroid Build Coastguard WorkerPPD files defined by the driver information file <VAR>mydrivers.drv</VAR>:</P> 516*5e7646d2SAndroid Build Coastguard Worker 517*5e7646d2SAndroid Build Coastguard Worker<pre class='command'> 518*5e7646d2SAndroid Build Coastguard Workerppdc mydrivers.drv 519*5e7646d2SAndroid Build Coastguard Worker</pre> 520*5e7646d2SAndroid Build Coastguard Worker 521*5e7646d2SAndroid Build Coastguard Worker<P>The PPD files are placed in a subdirectory called 522*5e7646d2SAndroid Build Coastguard Worker<VAR>ppd</VAR>. The <TT>-d</TT> option is used to put the PPD 523*5e7646d2SAndroid Build Coastguard Workerfiles in a different location, for example:</p> 524*5e7646d2SAndroid Build Coastguard Worker 525*5e7646d2SAndroid Build Coastguard Worker<pre class='command'> 526*5e7646d2SAndroid Build Coastguard Workerppdc -d myppds mydrivers.drv 527*5e7646d2SAndroid Build Coastguard Worker</pre> 528*5e7646d2SAndroid Build Coastguard Worker 529*5e7646d2SAndroid Build Coastguard Worker<P>places the PPD files in a subdirectory named 530*5e7646d2SAndroid Build Coastguard Worker<VAR>myppds</VAR>. Finally, use the <TT>-l</TT> option to 531*5e7646d2SAndroid Build Coastguard Workerspecify the language localization for the PPD files that are 532*5e7646d2SAndroid Build Coastguard Workercreated, for example:</P> 533*5e7646d2SAndroid Build Coastguard Worker 534*5e7646d2SAndroid Build Coastguard Worker<pre class='command'> 535*5e7646d2SAndroid Build Coastguard Workerppdc -d myppds/de -l de mydrivers.drv 536*5e7646d2SAndroid Build Coastguard Workerppdc -d myppds/en -l en mydrivers.drv 537*5e7646d2SAndroid Build Coastguard Workerppdc -d myppds/es -l es mydrivers.drv 538*5e7646d2SAndroid Build Coastguard Workerppdc -d myppds/fr -l fr mydrivers.drv 539*5e7646d2SAndroid Build Coastguard Workerppdc -d myppds/it -l it mydrivers.drv 540*5e7646d2SAndroid Build Coastguard Worker</pre> 541*5e7646d2SAndroid Build Coastguard Worker 542*5e7646d2SAndroid Build Coastguard Worker<P>creates PPD files in German (de), English (en), Spanish (es), 543*5e7646d2SAndroid Build Coastguard WorkerFrench (fr), and Italian (it) in the corresponding 544*5e7646d2SAndroid Build Coastguard Workersubdirectories. Specify multiple languages (separated by commas) to produce 545*5e7646d2SAndroid Build Coastguard Worker"globalized" PPD files:</p> 546*5e7646d2SAndroid Build Coastguard Worker 547*5e7646d2SAndroid Build Coastguard Worker<pre class='command'> 548*5e7646d2SAndroid Build Coastguard Workerppdc -d myppds -l de,en,es,fr,it mydrivers.drv 549*5e7646d2SAndroid Build Coastguard Worker</pre> 550*5e7646d2SAndroid Build Coastguard Worker 551*5e7646d2SAndroid Build Coastguard Worker 552*5e7646d2SAndroid Build Coastguard Worker<h2 class='title'><a name='DRV'>Driver Information Files</a></h2> 553*5e7646d2SAndroid Build Coastguard Worker 554*5e7646d2SAndroid Build Coastguard Worker<P>The driver information files accepted by the PPD compiler are 555*5e7646d2SAndroid Build Coastguard Workerplain text files that define the various attributes and options 556*5e7646d2SAndroid Build Coastguard Workerthat are included in the PPD files that are generated. A driver 557*5e7646d2SAndroid Build Coastguard Workerinformation file can define the information for one or more printers and 558*5e7646d2SAndroid Build Coastguard Workertheir corresponding PPD files.</P> 559*5e7646d2SAndroid Build Coastguard Worker 560*5e7646d2SAndroid Build Coastguard Worker<p class='example'><a name="LISTING1">Listing 1: "examples/minimum.drv"</a></p> 561*5e7646d2SAndroid Build Coastguard Worker 562*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 563*5e7646d2SAndroid Build Coastguard Worker<I>// Include standard font and media definitions</I> 564*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <font.defs> 565*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <media.defs> 566*5e7646d2SAndroid Build Coastguard Worker 567*5e7646d2SAndroid Build Coastguard Worker<I>// List the fonts that are supported, in this case all standard fonts...</I> 568*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Font'>Font</a> * 569*5e7646d2SAndroid Build Coastguard Worker 570*5e7646d2SAndroid Build Coastguard Worker<I>// Manufacturer, model name, and version</I> 571*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Manufacturer'>Manufacturer</a> "Foo" 572*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet 2000" 573*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Version'>Version</a> 1.0 574*5e7646d2SAndroid Build Coastguard Worker 575*5e7646d2SAndroid Build Coastguard Worker<I>// Each filter provided by the driver...</I> 576*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/vnd.cups-raster 100 rastertofoo 577*5e7646d2SAndroid Build Coastguard Worker 578*5e7646d2SAndroid Build Coastguard Worker<I>// Supported page sizes</I> 579*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> Letter 580*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> A4 581*5e7646d2SAndroid Build Coastguard Worker 582*5e7646d2SAndroid Build Coastguard Worker<I>// Supported resolutions</I> 583*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#Resolution'>Resolution</a> k 8 0 0 0 "600dpi/600 DPI" 584*5e7646d2SAndroid Build Coastguard Worker 585*5e7646d2SAndroid Build Coastguard Worker<I>// Specify the name of the PPD file we want to generate...</I> 586*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#PCFileName'>PCFileName</a> "foojet2k.ppd" 587*5e7646d2SAndroid Build Coastguard Worker</pre> 588*5e7646d2SAndroid Build Coastguard Worker 589*5e7646d2SAndroid Build Coastguard Worker 590*5e7646d2SAndroid Build Coastguard Worker<h3><a name='SIMPLE'>A Simple Example</a></h3> 591*5e7646d2SAndroid Build Coastguard Worker 592*5e7646d2SAndroid Build Coastguard Worker<P>The example in <A HREF="#LISTING1">Listing 1</A> shows a driver information 593*5e7646d2SAndroid Build Coastguard Workerfile which defines the minimum required attributes to provide a valid PPD file. 594*5e7646d2SAndroid Build Coastguard WorkerThe first part of the file includes standard definition files for fonts and 595*5e7646d2SAndroid Build Coastguard Workermedia sizes:</P> 596*5e7646d2SAndroid Build Coastguard Worker 597*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 598*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <font.defs> 599*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <media.defs> 600*5e7646d2SAndroid Build Coastguard Worker</pre> 601*5e7646d2SAndroid Build Coastguard Worker 602*5e7646d2SAndroid Build Coastguard Worker<P>The <TT>#include</TT> directive works just like the C/C++ include directive; 603*5e7646d2SAndroid Build Coastguard Workerfiles included using the angle brackets (<TT><filename></TT>) are found 604*5e7646d2SAndroid Build Coastguard Workerin any of the standard include directories and files included using quotes 605*5e7646d2SAndroid Build Coastguard Worker(<TT>"filename"</TT>) are found in the same directory as the source or include 606*5e7646d2SAndroid Build Coastguard Workerfile. The <TT><font.defs></TT> include file defines the standard fonts 607*5e7646d2SAndroid Build Coastguard Workerwhich are included with GPL Ghostscript and the Apple PDF RIP, while the 608*5e7646d2SAndroid Build Coastguard Worker<TT><media.defs></TT> include file defines the standard media sizes 609*5e7646d2SAndroid Build Coastguard Workerlisted in Appendix B of the Adobe PostScript Printer Description File Format 610*5e7646d2SAndroid Build Coastguard WorkerSpecification.</P> 611*5e7646d2SAndroid Build Coastguard Worker 612*5e7646d2SAndroid Build Coastguard Worker<P>CUPS provides several other standard include files:</P> 613*5e7646d2SAndroid Build Coastguard Worker 614*5e7646d2SAndroid Build Coastguard Worker<UL> 615*5e7646d2SAndroid Build Coastguard Worker 616*5e7646d2SAndroid Build Coastguard Worker <LI><TT><epson.h></TT> - Defines all of the rastertoepson driver 617*5e7646d2SAndroid Build Coastguard Worker constants.</LI> 618*5e7646d2SAndroid Build Coastguard Worker 619*5e7646d2SAndroid Build Coastguard Worker <LI><TT><escp.h></TT> - Defines all of the rastertoescpx driver 620*5e7646d2SAndroid Build Coastguard Worker constants.</LI> 621*5e7646d2SAndroid Build Coastguard Worker 622*5e7646d2SAndroid Build Coastguard Worker <LI><TT><hp.h></TT> - Defines all of the rastertohp driver 623*5e7646d2SAndroid Build Coastguard Worker constants.</LI> 624*5e7646d2SAndroid Build Coastguard Worker 625*5e7646d2SAndroid Build Coastguard Worker <LI><TT><label.h></TT> - Defines all of the rastertolabel driver 626*5e7646d2SAndroid Build Coastguard Worker constants.</LI> 627*5e7646d2SAndroid Build Coastguard Worker 628*5e7646d2SAndroid Build Coastguard Worker <LI><TT><pcl.h></TT> - Defines all of the rastertopclx driver 629*5e7646d2SAndroid Build Coastguard Worker constants.</LI> 630*5e7646d2SAndroid Build Coastguard Worker 631*5e7646d2SAndroid Build Coastguard Worker <LI><TT><raster.defs></TT> - Defines all of the CUPS raster format 632*5e7646d2SAndroid Build Coastguard Worker constants.</LI> 633*5e7646d2SAndroid Build Coastguard Worker 634*5e7646d2SAndroid Build Coastguard Worker</UL> 635*5e7646d2SAndroid Build Coastguard Worker 636*5e7646d2SAndroid Build Coastguard Worker<P>Next we list all of the fonts that are available in the driver; for CUPS 637*5e7646d2SAndroid Build Coastguard Workerraster drivers, the following line is all that is usually supplied:</P> 638*5e7646d2SAndroid Build Coastguard Worker 639*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 640*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Font'>Font</a> * 641*5e7646d2SAndroid Build Coastguard Worker</pre> 642*5e7646d2SAndroid Build Coastguard Worker 643*5e7646d2SAndroid Build Coastguard Worker<P>The <TT>Font</TT> directive specifies the name of a single font or the 644*5e7646d2SAndroid Build Coastguard Workerasterisk to specify all fonts. For example, you would use the following line to 645*5e7646d2SAndroid Build Coastguard Workerdefine an additional bar code font that you are supplying with your printer 646*5e7646d2SAndroid Build Coastguard Workerdriver:</P> 647*5e7646d2SAndroid Build Coastguard Worker 648*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 649*5e7646d2SAndroid Build Coastguard Worker<I>// name encoding version charset status</I> 650*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Font'>Font</a> Barcode-Foo Special "(1.0)" Special ROM 651*5e7646d2SAndroid Build Coastguard Worker</pre> 652*5e7646d2SAndroid Build Coastguard Worker 653*5e7646d2SAndroid Build Coastguard Worker<P>The name of the font is <TT>Barcode-Foo</TT>. Since it is not a standard 654*5e7646d2SAndroid Build Coastguard Workertext font, the encoding and charset name <TT>Special</TT> is used. The version 655*5e7646d2SAndroid Build Coastguard Workernumber is <TT>1.0</TT> and the status (where the font is located) is 656*5e7646d2SAndroid Build Coastguard Worker<TT>ROM</TT> to indicate that the font does not need to be embedded in 657*5e7646d2SAndroid Build Coastguard Workerdocuments that use the font for this printer.</P> 658*5e7646d2SAndroid Build Coastguard Worker 659*5e7646d2SAndroid Build Coastguard Worker<P>Third comes the manufacturer, model name, and version number information 660*5e7646d2SAndroid Build Coastguard Workerstrings:</P> 661*5e7646d2SAndroid Build Coastguard Worker 662*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 663*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Manufacturer'>Manufacturer</a> "Foo" 664*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet 2000" 665*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Version'>Version</a> 1.0 666*5e7646d2SAndroid Build Coastguard Worker</pre> 667*5e7646d2SAndroid Build Coastguard Worker 668*5e7646d2SAndroid Build Coastguard Worker<P>These strings are used when the user (or auto-configuration program) selects 669*5e7646d2SAndroid Build Coastguard Workerthe printer driver for a newly connected device.</p> 670*5e7646d2SAndroid Build Coastguard Worker 671*5e7646d2SAndroid Build Coastguard Worker<P>The list of filters comes after the information strings; for the example in 672*5e7646d2SAndroid Build Coastguard Worker<A HREF="#LISTING1">Listing 1</A>, we have a single filter that takes CUPS 673*5e7646d2SAndroid Build Coastguard Workerraster data:</P> 674*5e7646d2SAndroid Build Coastguard Worker 675*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 676*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/vnd.cups-raster 100 rastertofoo 677*5e7646d2SAndroid Build Coastguard Worker</pre> 678*5e7646d2SAndroid Build Coastguard Worker 679*5e7646d2SAndroid Build Coastguard Worker<P>Each filter specified in the driver information file is the equivalent of a 680*5e7646d2SAndroid Build Coastguard Workerprinter driver for that format; if a user submits a print job in a different 681*5e7646d2SAndroid Build Coastguard Workerformat, CUPS figures out the sequence of commands that will produce a supported 682*5e7646d2SAndroid Build Coastguard Workerformat for the least relative cost.</P> 683*5e7646d2SAndroid Build Coastguard Worker 684*5e7646d2SAndroid Build Coastguard Worker<P>Once we have defined the driver information we specify the supported options. 685*5e7646d2SAndroid Build Coastguard WorkerFor the example driver we support a single resolution of 600 dots per inch and 686*5e7646d2SAndroid Build Coastguard Workertwo media sizes, A4 and Letter:</P> 687*5e7646d2SAndroid Build Coastguard Worker 688*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 689*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> Letter 690*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> A4 691*5e7646d2SAndroid Build Coastguard Worker 692*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#Resolution'>Resolution</a> k 8 0 0 0 "600dpi/600 DPI" 693*5e7646d2SAndroid Build Coastguard Worker</pre> 694*5e7646d2SAndroid Build Coastguard Worker 695*5e7646d2SAndroid Build Coastguard Worker<P>The asterisk in front of the <TT>MediaSize</TT> and <TT>Resolution</TT> 696*5e7646d2SAndroid Build Coastguard Workerdirectives specify that those option choices are the default. The 697*5e7646d2SAndroid Build Coastguard Worker<TT>MediaSize</TT> directive is followed by a media size name which is normally 698*5e7646d2SAndroid Build Coastguard Workerdefined in the <TT><media.defs></TT> file and corresponds to a standard 699*5e7646d2SAndroid Build Coastguard WorkerAdobe media size name. If the default media size is <TT>Letter</TT>, the PPD 700*5e7646d2SAndroid Build Coastguard Workercompiler will override it to be <TT>A4</TT> for non-English localizations for 701*5e7646d2SAndroid Build Coastguard Workeryou automatically.</P> 702*5e7646d2SAndroid Build Coastguard Worker 703*5e7646d2SAndroid Build Coastguard Worker<P>The <TT>Resolution</TT> directive accepts several values after it as 704*5e7646d2SAndroid Build Coastguard Workerfollows:</P> 705*5e7646d2SAndroid Build Coastguard Worker 706*5e7646d2SAndroid Build Coastguard Worker<OL> 707*5e7646d2SAndroid Build Coastguard Worker 708*5e7646d2SAndroid Build Coastguard Worker <LI>Colorspace for this resolution, if any. In the example file, the 709*5e7646d2SAndroid Build Coastguard Worker colorspace <TT>k</TT> is used which corresponds to black. For printer 710*5e7646d2SAndroid Build Coastguard Worker drivers that support color printing, this field is usually specified as 711*5e7646d2SAndroid Build Coastguard Worker "-" for "no change".</LI> 712*5e7646d2SAndroid Build Coastguard Worker 713*5e7646d2SAndroid Build Coastguard Worker <LI>Bits per color. In the example file, we define 8 bits per color, for 714*5e7646d2SAndroid Build Coastguard Worker a continuous-tone grayscale output. All versions of CUPS support 1 and 715*5e7646d2SAndroid Build Coastguard Worker 8 bits per color. CUPS 1.2 and higher (macOS 10.5 and higher) also 716*5e7646d2SAndroid Build Coastguard Worker supports 16 bits per color.</LI> 717*5e7646d2SAndroid Build Coastguard Worker 718*5e7646d2SAndroid Build Coastguard Worker <LI>Rows per band. In the example file, we define 0 rows per band to 719*5e7646d2SAndroid Build Coastguard Worker indicate that our printer driver does not process the page in 720*5e7646d2SAndroid Build Coastguard Worker bands.</LI> 721*5e7646d2SAndroid Build Coastguard Worker 722*5e7646d2SAndroid Build Coastguard Worker <LI>Row feed. In the example, we define the feed value to be 0 to 723*5e7646d2SAndroid Build Coastguard Worker indicate that our printer driver does not interleave the output.</LI> 724*5e7646d2SAndroid Build Coastguard Worker 725*5e7646d2SAndroid Build Coastguard Worker <LI>Row step. In the example, we define the step value to be 0 to 726*5e7646d2SAndroid Build Coastguard Worker indicate that our printer driver does not interleave the output. This 727*5e7646d2SAndroid Build Coastguard Worker value normally indicates the spacing between the nozzles of an inkjet 728*5e7646d2SAndroid Build Coastguard Worker printer - when combined with the previous two values, it informs the 729*5e7646d2SAndroid Build Coastguard Worker driver how to stagger the output on the page to produce interleaved 730*5e7646d2SAndroid Build Coastguard Worker lines on the page for higher-resolution output.</LI> 731*5e7646d2SAndroid Build Coastguard Worker 732*5e7646d2SAndroid Build Coastguard Worker <LI>Choice name and text. In the example, we define the choice name and 733*5e7646d2SAndroid Build Coastguard Worker text to be <TT>"600dpi/600 DPI"</TT>. The name and text are separated by 734*5e7646d2SAndroid Build Coastguard Worker slash (<TT>/</TT>) character; if no text is specified, then the name is 735*5e7646d2SAndroid Build Coastguard Worker used as the text. The PPD compiler parses the name to determine the 736*5e7646d2SAndroid Build Coastguard Worker actual resolution; the name can be of the form 737*5e7646d2SAndroid Build Coastguard Worker <TT><I>RESOLUTION</I>dpi</TT> for resolutions that are equal 738*5e7646d2SAndroid Build Coastguard Worker horizontally and vertically or <TT><I>HRES</I>x<I>VRES</I>dpi</TT> for 739*5e7646d2SAndroid Build Coastguard Worker isometric resolutions. Only integer resolution values are supported, so 740*5e7646d2SAndroid Build Coastguard Worker a resolution name of <TT>300dpi</TT> is valid while <TT>300.1dpi</TT> is 741*5e7646d2SAndroid Build Coastguard Worker not.</LI> 742*5e7646d2SAndroid Build Coastguard Worker 743*5e7646d2SAndroid Build Coastguard Worker</OL> 744*5e7646d2SAndroid Build Coastguard Worker 745*5e7646d2SAndroid Build Coastguard Worker<P>Finally, the <TT>PCFileName</TT> directive specifies that the named PPD file 746*5e7646d2SAndroid Build Coastguard Workershould be written for the current driver definitions:</P> 747*5e7646d2SAndroid Build Coastguard Worker 748*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 749*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#PCFileName'>PCFileName</a> "foojet2k.ppd" 750*5e7646d2SAndroid Build Coastguard Worker</pre> 751*5e7646d2SAndroid Build Coastguard Worker 752*5e7646d2SAndroid Build Coastguard Worker<P>The filename follows the directive and <I>must</I> conform to the Adobe 753*5e7646d2SAndroid Build Coastguard Workerfilename requirements in the Adobe Postscript Printer Description File Format 754*5e7646d2SAndroid Build Coastguard WorkerSpecification. Specifically, the filename may not exceed 8 characters followed 755*5e7646d2SAndroid Build Coastguard Workerby the extension <VAR>.ppd</VAR>. The <TT>FileName</TT> directive can be used to 756*5e7646d2SAndroid Build Coastguard Workerspecify longer filenames:</P> 757*5e7646d2SAndroid Build Coastguard Worker 758*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 759*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#FileName'>FileName</a> "FooJet 2000" 760*5e7646d2SAndroid Build Coastguard Worker</pre> 761*5e7646d2SAndroid Build Coastguard Worker 762*5e7646d2SAndroid Build Coastguard Worker 763*5e7646d2SAndroid Build Coastguard Worker<h3><a name='GROUPING'>Grouping and Inheritance</a></h3> 764*5e7646d2SAndroid Build Coastguard Worker 765*5e7646d2SAndroid Build Coastguard Worker<P>The previous example created a single PPD file. Driver information files can 766*5e7646d2SAndroid Build Coastguard Workeralso define multiple printers by using the PPD compiler grouping functionality. 767*5e7646d2SAndroid Build Coastguard WorkerDirectives are grouped using the curly braces (<TT>{</TT> and <TT>}</TT>) and 768*5e7646d2SAndroid Build Coastguard Workerevery group that uses the <TT>PCFileName</TT> or <TT>FileName</TT> directives 769*5e7646d2SAndroid Build Coastguard Workerproduces a PPD file with that name. <A HREF="#LISTING2">Listing 2</A> shows a 770*5e7646d2SAndroid Build Coastguard Workervariation of the original example that uses two groups to define two printers 771*5e7646d2SAndroid Build Coastguard Workerthat share the same printer driver filter but provide two different resolution 772*5e7646d2SAndroid Build Coastguard Workeroptions.</P> 773*5e7646d2SAndroid Build Coastguard Worker 774*5e7646d2SAndroid Build Coastguard Worker<p class='example'><a name="LISTING2">Listing 2: "examples/grouping.drv"</a></p> 775*5e7646d2SAndroid Build Coastguard Worker 776*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 777*5e7646d2SAndroid Build Coastguard Worker 778*5e7646d2SAndroid Build Coastguard Worker<I>// Include standard font and media definitions</I> 779*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <font.defs> 780*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <media.defs> 781*5e7646d2SAndroid Build Coastguard Worker 782*5e7646d2SAndroid Build Coastguard Worker<I>// List the fonts that are supported, in this case all standard fonts...</I> 783*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Font'>Font</a> * 784*5e7646d2SAndroid Build Coastguard Worker 785*5e7646d2SAndroid Build Coastguard Worker<I>// Manufacturer and version</I> 786*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Manufacturer'>Manufacturer</a> "Foo" 787*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Version'>Version</a> 1.0 788*5e7646d2SAndroid Build Coastguard Worker 789*5e7646d2SAndroid Build Coastguard Worker<I>// Each filter provided by the driver...</I> 790*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/vnd.cups-raster 100 rastertofoo 791*5e7646d2SAndroid Build Coastguard Worker 792*5e7646d2SAndroid Build Coastguard Worker<I>// Supported page sizes</I> 793*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> Letter 794*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> A4 795*5e7646d2SAndroid Build Coastguard Worker 796*5e7646d2SAndroid Build Coastguard Worker{ 797*5e7646d2SAndroid Build Coastguard Worker <I>// Supported resolutions</I> 798*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Resolution'>Resolution</a> k 8 0 0 0 "600dpi/600 DPI" 799*5e7646d2SAndroid Build Coastguard Worker 800*5e7646d2SAndroid Build Coastguard Worker <I>// Specify the model name and filename...</I> 801*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet 2000" 802*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#PCFileName'>PCFileName</a> "foojet2k.ppd" 803*5e7646d2SAndroid Build Coastguard Worker} 804*5e7646d2SAndroid Build Coastguard Worker 805*5e7646d2SAndroid Build Coastguard Worker{ 806*5e7646d2SAndroid Build Coastguard Worker <I>// Supported resolutions</I> 807*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Resolution'>Resolution</a> k 8 0 0 0 "1200dpi/1200 DPI" 808*5e7646d2SAndroid Build Coastguard Worker 809*5e7646d2SAndroid Build Coastguard Worker <I>// Specify the model name and filename...</I> 810*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet 2001" 811*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#PCFileName'>PCFileName</a> "foojt2k1.ppd" 812*5e7646d2SAndroid Build Coastguard Worker} 813*5e7646d2SAndroid Build Coastguard Worker</pre> 814*5e7646d2SAndroid Build Coastguard Worker 815*5e7646d2SAndroid Build Coastguard Worker<P>The second example is essentially the same as the first, except that each 816*5e7646d2SAndroid Build Coastguard Workerprinter model is defined inside of a pair of curly braces. For example, the 817*5e7646d2SAndroid Build Coastguard Workerfirst printer is defined using:</P> 818*5e7646d2SAndroid Build Coastguard Worker 819*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 820*5e7646d2SAndroid Build Coastguard Worker{ 821*5e7646d2SAndroid Build Coastguard Worker // Supported resolutions 822*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Resolution'>Resolution</a> k 8 0 0 0 "600dpi/600 DPI" 823*5e7646d2SAndroid Build Coastguard Worker 824*5e7646d2SAndroid Build Coastguard Worker // Specify the model name and filename... 825*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet 2000" 826*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#PCFileName'>PCFileName</a> "foojet2k.ppd" 827*5e7646d2SAndroid Build Coastguard Worker} 828*5e7646d2SAndroid Build Coastguard Worker</pre> 829*5e7646d2SAndroid Build Coastguard Worker 830*5e7646d2SAndroid Build Coastguard Worker<P>The printer <I>inherits</I> all of the definitions from the parent group (the 831*5e7646d2SAndroid Build Coastguard Workertop part of the file) and adds the additional definitions inside the curly 832*5e7646d2SAndroid Build Coastguard Workerbraces for that printer driver. When we define the second group, it also 833*5e7646d2SAndroid Build Coastguard Workerinherits the same definitions from the parent group but <I>none</I> of the 834*5e7646d2SAndroid Build Coastguard Workerdefinitions from the first driver. Groups can be nested to any number of levels 835*5e7646d2SAndroid Build Coastguard Workerto support variations of similar models without duplication of information.</P> 836*5e7646d2SAndroid Build Coastguard Worker 837*5e7646d2SAndroid Build Coastguard Worker 838*5e7646d2SAndroid Build Coastguard Worker<h3><a name='COLOR'>Color Support</a></h3> 839*5e7646d2SAndroid Build Coastguard Worker 840*5e7646d2SAndroid Build Coastguard Worker<P>For printer drivers that support color printing, the 841*5e7646d2SAndroid Build Coastguard Worker<TT>ColorDevice</TT> and <TT>ColorModel</TT> directives should be 842*5e7646d2SAndroid Build Coastguard Workerused to tell the printing system that color output is desired 843*5e7646d2SAndroid Build Coastguard Workerand in what formats. <A HREF="#LISTING3">Listing 3</A> shows a 844*5e7646d2SAndroid Build Coastguard Workervariation of the previous example which includes a color printer 845*5e7646d2SAndroid Build Coastguard Workerthat supports printing at 300 and 600 DPI.</P> 846*5e7646d2SAndroid Build Coastguard Worker 847*5e7646d2SAndroid Build Coastguard Worker<P>The key changes are the addition of the <TT>ColorDevice</TT> 848*5e7646d2SAndroid Build Coastguard Workerdirective:</P> 849*5e7646d2SAndroid Build Coastguard Worker 850*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 851*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#ColorDevice'>ColorDevice</a> true 852*5e7646d2SAndroid Build Coastguard Worker</pre> 853*5e7646d2SAndroid Build Coastguard Worker 854*5e7646d2SAndroid Build Coastguard Worker<P>which tells the printing system that the printer supports 855*5e7646d2SAndroid Build Coastguard Workercolor printing, and the <TT>ColorModel</TT> directives:</P> 856*5e7646d2SAndroid Build Coastguard Worker 857*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 858*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#ColorModel'>ColorModel</a> Gray/Grayscale w chunky 0 859*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#ColorModel'>ColorModel</a> RGB/Color rgb chunky 0 860*5e7646d2SAndroid Build Coastguard Worker</pre> 861*5e7646d2SAndroid Build Coastguard Worker 862*5e7646d2SAndroid Build Coastguard Worker<P>which tell the printing system which colorspaces are supported by the printer 863*5e7646d2SAndroid Build Coastguard Workerdriver for color printing. Each of the <TT>ColorModel</TT> directives is 864*5e7646d2SAndroid Build Coastguard Workerfollowed by the option name and text (<TT>Gray/Grayscale</TT> and 865*5e7646d2SAndroid Build Coastguard Worker<TT>RGB/Color</TT>), the colorspace name (<TT>w</TT> and <TT>rgb</TT>), the 866*5e7646d2SAndroid Build Coastguard Workercolor organization (<TT>chunky</TT>), and the compression mode number 867*5e7646d2SAndroid Build Coastguard Worker(<TT>0</TT>) to be passed to the driver. The option name can be any of the 868*5e7646d2SAndroid Build Coastguard Workerstandard Adobe <TT>ColorModel</TT> names:</P> 869*5e7646d2SAndroid Build Coastguard Worker 870*5e7646d2SAndroid Build Coastguard Worker<UL> 871*5e7646d2SAndroid Build Coastguard Worker 872*5e7646d2SAndroid Build Coastguard Worker <LI><TT>Gray</TT> - Grayscale output. 873*5e7646d2SAndroid Build Coastguard Worker 874*5e7646d2SAndroid Build Coastguard Worker <LI><TT>RGB</TT> - Color output, typically using the RGB 875*5e7646d2SAndroid Build Coastguard Worker colorspace, but without a separate black channel. 876*5e7646d2SAndroid Build Coastguard Worker 877*5e7646d2SAndroid Build Coastguard Worker <LI><TT>CMYK</TT> - Color output with a separate black 878*5e7646d2SAndroid Build Coastguard Worker channel. 879*5e7646d2SAndroid Build Coastguard Worker 880*5e7646d2SAndroid Build Coastguard Worker</UL> 881*5e7646d2SAndroid Build Coastguard Worker 882*5e7646d2SAndroid Build Coastguard Worker<P>Custom names can be used, however it is recommended that you use your vendor 883*5e7646d2SAndroid Build Coastguard Workerprefix for any custom names, for example "fooName".</P> 884*5e7646d2SAndroid Build Coastguard Worker 885*5e7646d2SAndroid Build Coastguard Worker<P>The colorspace name can be any of the following universally supported 886*5e7646d2SAndroid Build Coastguard Workercolorspaces:</P> 887*5e7646d2SAndroid Build Coastguard Worker 888*5e7646d2SAndroid Build Coastguard Worker<UL> 889*5e7646d2SAndroid Build Coastguard Worker <LI><TT>w</TT> - Luminance</LI> 890*5e7646d2SAndroid Build Coastguard Worker 891*5e7646d2SAndroid Build Coastguard Worker <LI><TT>rgb</TT> - Red, green, blue</LI> 892*5e7646d2SAndroid Build Coastguard Worker 893*5e7646d2SAndroid Build Coastguard Worker <LI><TT>k</TT> - Black</LI> 894*5e7646d2SAndroid Build Coastguard Worker 895*5e7646d2SAndroid Build Coastguard Worker <LI><TT>cmy</TT> - Cyan, magenta, yellow</LI> 896*5e7646d2SAndroid Build Coastguard Worker 897*5e7646d2SAndroid Build Coastguard Worker <LI><TT>cmyk</TT> - Cyan, magenta, yellow, black</LI> 898*5e7646d2SAndroid Build Coastguard Worker 899*5e7646d2SAndroid Build Coastguard Worker</UL> 900*5e7646d2SAndroid Build Coastguard Worker 901*5e7646d2SAndroid Build Coastguard Worker<P>The color organization can be any of the following values:</P> 902*5e7646d2SAndroid Build Coastguard Worker 903*5e7646d2SAndroid Build Coastguard Worker<UL> 904*5e7646d2SAndroid Build Coastguard Worker 905*5e7646d2SAndroid Build Coastguard Worker <LI><TT>chunky</TT> - Color values are passed together on a line 906*5e7646d2SAndroid Build Coastguard Worker as RGB RGB RGB RGB</LI> 907*5e7646d2SAndroid Build Coastguard Worker 908*5e7646d2SAndroid Build Coastguard Worker <LI><TT>banded</TT> - Color values are passed separately 909*5e7646d2SAndroid Build Coastguard Worker on a line as RRRR GGGG BBBB; not supported by the Apple 910*5e7646d2SAndroid Build Coastguard Worker RIP filters</LI> 911*5e7646d2SAndroid Build Coastguard Worker 912*5e7646d2SAndroid Build Coastguard Worker <LI><TT>planar</TT> - Color values are passed separately 913*5e7646d2SAndroid Build Coastguard Worker on a page as RRRR RRRR RRRR ... GGGG GGGG GGGG ... BBBB 914*5e7646d2SAndroid Build Coastguard Worker BBBB BBBB; not supported by the Apple RIP filters</LI> 915*5e7646d2SAndroid Build Coastguard Worker 916*5e7646d2SAndroid Build Coastguard Worker</UL> 917*5e7646d2SAndroid Build Coastguard Worker 918*5e7646d2SAndroid Build Coastguard Worker<P>The compression mode value is passed to the driver in the 919*5e7646d2SAndroid Build Coastguard Worker<TT>cupsCompression</TT> attribute. It is traditionally used to select an 920*5e7646d2SAndroid Build Coastguard Workerappropriate compression mode for the color model but can be used for any 921*5e7646d2SAndroid Build Coastguard Workerpurpose, such as specifying a photo mode vs. standard mode.</P> 922*5e7646d2SAndroid Build Coastguard Worker 923*5e7646d2SAndroid Build Coastguard Worker<p class='example'><a name="LISTING3">Listing 3: "examples/color.drv"</a></p> 924*5e7646d2SAndroid Build Coastguard Worker 925*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 926*5e7646d2SAndroid Build Coastguard Worker 927*5e7646d2SAndroid Build Coastguard Worker<I>// Include standard font and media definitions</I> 928*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <font.defs> 929*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <media.defs> 930*5e7646d2SAndroid Build Coastguard Worker 931*5e7646d2SAndroid Build Coastguard Worker<I>// List the fonts that are supported, in this case all standard fonts...</I> 932*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Font'>Font</a> * 933*5e7646d2SAndroid Build Coastguard Worker 934*5e7646d2SAndroid Build Coastguard Worker<I>// Manufacturer and version</I> 935*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Manufacturer'>Manufacturer</a> "Foo" 936*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Version'>Version</a> 1.0 937*5e7646d2SAndroid Build Coastguard Worker 938*5e7646d2SAndroid Build Coastguard Worker<I>// Each filter provided by the driver...</I> 939*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/vnd.cups-raster 100 rastertofoo 940*5e7646d2SAndroid Build Coastguard Worker 941*5e7646d2SAndroid Build Coastguard Worker<I>// Supported page sizes</I> 942*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> Letter 943*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> A4 944*5e7646d2SAndroid Build Coastguard Worker 945*5e7646d2SAndroid Build Coastguard Worker{ 946*5e7646d2SAndroid Build Coastguard Worker <I>// Supported resolutions</I> 947*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Resolution'>Resolution</a> k 8 0 0 0 "600dpi/600 DPI" 948*5e7646d2SAndroid Build Coastguard Worker 949*5e7646d2SAndroid Build Coastguard Worker <I>// Specify the model name and filename...</I> 950*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet 2000" 951*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#PCFileName'>PCFileName</a> "foojet2k.ppd" 952*5e7646d2SAndroid Build Coastguard Worker} 953*5e7646d2SAndroid Build Coastguard Worker 954*5e7646d2SAndroid Build Coastguard Worker{ 955*5e7646d2SAndroid Build Coastguard Worker <I>// Supports color printing</I> 956*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ColorDevice'>ColorDevice</a> true 957*5e7646d2SAndroid Build Coastguard Worker 958*5e7646d2SAndroid Build Coastguard Worker <I>// Supported colorspaces</I> 959*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ColorModel'>ColorModel</a> Gray/Grayscale w chunky 0 960*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#ColorModel'>ColorModel</a> RGB/Color rgb chunky 0 961*5e7646d2SAndroid Build Coastguard Worker 962*5e7646d2SAndroid Build Coastguard Worker <I>// Supported resolutions</I> 963*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Resolution'>Resolution</a> - 8 0 0 0 "300dpi/300 DPI" 964*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Resolution'>Resolution</a> - 8 0 0 0 "600dpi/600 DPI" 965*5e7646d2SAndroid Build Coastguard Worker 966*5e7646d2SAndroid Build Coastguard Worker <I>// Specify the model name and filename...</I> 967*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet Color" 968*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#PCFileName'>PCFileName</a> "foojetco.ppd" 969*5e7646d2SAndroid Build Coastguard Worker} 970*5e7646d2SAndroid Build Coastguard Worker</pre> 971*5e7646d2SAndroid Build Coastguard Worker 972*5e7646d2SAndroid Build Coastguard Worker 973*5e7646d2SAndroid Build Coastguard Worker<h3><a name='OPTIONS'>Defining Custom Options and Option Groups</a></h3> 974*5e7646d2SAndroid Build Coastguard Worker 975*5e7646d2SAndroid Build Coastguard Worker<P>The <TT>Group</TT>, <TT>Option</TT>, and <TT>Choice</TT> 976*5e7646d2SAndroid Build Coastguard Workerdirectives are used to define or select a group, option, or 977*5e7646d2SAndroid Build Coastguard Workerchoice. <A HREF="#LISTING4">Listing 4</A> shows a variation of 978*5e7646d2SAndroid Build Coastguard Workerthe first example that provides two custom options in a group 979*5e7646d2SAndroid Build Coastguard Workernamed "Footasm".</P> 980*5e7646d2SAndroid Build Coastguard Worker 981*5e7646d2SAndroid Build Coastguard Worker<p class='example'><a name="LISTING4">Listing 4: "examples/custom.drv"</a></p> 982*5e7646d2SAndroid Build Coastguard Worker 983*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 984*5e7646d2SAndroid Build Coastguard Worker 985*5e7646d2SAndroid Build Coastguard Worker<I>// Include standard font and media definitions</I> 986*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <font.defs> 987*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <media.defs> 988*5e7646d2SAndroid Build Coastguard Worker 989*5e7646d2SAndroid Build Coastguard Worker<I>// List the fonts that are supported, in this case all standard fonts...</I> 990*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Font'>Font</a> * 991*5e7646d2SAndroid Build Coastguard Worker 992*5e7646d2SAndroid Build Coastguard Worker<I>// Manufacturer, model name, and version</I> 993*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Manufacturer'>Manufacturer</a> "Foo" 994*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet 2000" 995*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Version'>Version</a> 1.0 996*5e7646d2SAndroid Build Coastguard Worker 997*5e7646d2SAndroid Build Coastguard Worker<I>// Each filter provided by the driver...</I> 998*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/vnd.cups-raster 100 rastertofoo 999*5e7646d2SAndroid Build Coastguard Worker 1000*5e7646d2SAndroid Build Coastguard Worker<I>// Supported page sizes</I> 1001*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> Letter 1002*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> A4 1003*5e7646d2SAndroid Build Coastguard Worker 1004*5e7646d2SAndroid Build Coastguard Worker<I>// Supported resolutions</I> 1005*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#Resolution'>Resolution</a> k 8 0 0 0 "600dpi/600 DPI" 1006*5e7646d2SAndroid Build Coastguard Worker 1007*5e7646d2SAndroid Build Coastguard Worker<I>// Option Group</I> 1008*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Group'>Group</a> "Footasm" 1009*5e7646d2SAndroid Build Coastguard Worker 1010*5e7646d2SAndroid Build Coastguard Worker <I>// Boolean option</I> 1011*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Option'>Option</a> "fooEnhance/Resolution Enhancement" Boolean AnySetup 10 1012*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Choice'>Choice</a> True/Yes "<</cupsCompression 1>>setpagedevice" 1013*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> False/No "<</cupsCompression 0>>setpagedevice" 1014*5e7646d2SAndroid Build Coastguard Worker 1015*5e7646d2SAndroid Build Coastguard Worker <I>// Multiple choice option</I> 1016*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Option'>Option</a> "fooOutputType/Output Quality" PickOne AnySetup 10 1017*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Choice'>Choice</a> "Auto/Automatic Selection" 1018*5e7646d2SAndroid Build Coastguard Worker "<</OutputType(Auto)>>setpagedevice"" 1019*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "Text/Optimize for Text" 1020*5e7646d2SAndroid Build Coastguard Worker "<</OutputType(Text)>>setpagedevice"" 1021*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "Graph/Optimize for Graphics" 1022*5e7646d2SAndroid Build Coastguard Worker "<</OutputType(Graph)>>setpagedevice"" 1023*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "Photo/Optimize for Photos" 1024*5e7646d2SAndroid Build Coastguard Worker "<</OutputType(Photo)>>setpagedevice"" 1025*5e7646d2SAndroid Build Coastguard Worker 1026*5e7646d2SAndroid Build Coastguard Worker<I>// Specify the name of the PPD file we want to generate...</I> 1027*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#PCFileName'>PCFileName</a> "foojet2k.ppd" 1028*5e7646d2SAndroid Build Coastguard Worker</pre> 1029*5e7646d2SAndroid Build Coastguard Worker 1030*5e7646d2SAndroid Build Coastguard Worker<P>The custom group is introduced by the <TT>Group</TT> 1031*5e7646d2SAndroid Build Coastguard Workerdirective which is followed by the name and optionally text for 1032*5e7646d2SAndroid Build Coastguard Workerthe user:</P> 1033*5e7646d2SAndroid Build Coastguard Worker 1034*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1035*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Group'>Group</a> "Footasm/Footastic Options" 1036*5e7646d2SAndroid Build Coastguard Worker</pre> 1037*5e7646d2SAndroid Build Coastguard Worker 1038*5e7646d2SAndroid Build Coastguard Worker<P>The group name must conform to the PPD specification and 1039*5e7646d2SAndroid Build Coastguard Workercannot exceed 40 characters in length. If you specify user text, 1040*5e7646d2SAndroid Build Coastguard Workerit cannot exceed 80 characters in length. The groups 1041*5e7646d2SAndroid Build Coastguard Worker<TT>General</TT>, <TT>Extra</TT>, and 1042*5e7646d2SAndroid Build Coastguard Worker<TT>InstallableOptions</TT> are predefined by CUPS; the general 1043*5e7646d2SAndroid Build Coastguard Workerand extra groups are filled by the UI options defined by the PPD 1044*5e7646d2SAndroid Build Coastguard Workerspecification. The <TT>InstallableOptions</TT> group is reserved 1045*5e7646d2SAndroid Build Coastguard Workerfor options that define whether accessories for the printer 1046*5e7646d2SAndroid Build Coastguard Worker(duplexer unit, finisher, stapler, etc.) are installed.</P> 1047*5e7646d2SAndroid Build Coastguard Worker 1048*5e7646d2SAndroid Build Coastguard Worker<P>Once the group is specified, the <TT>Option</TT> directive is 1049*5e7646d2SAndroid Build Coastguard Workerused to introduce a new option:</P> 1050*5e7646d2SAndroid Build Coastguard Worker 1051*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1052*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Option'>Option</a> "fooEnhance/Resolution Enhancement" Boolean AnySetup 10 1053*5e7646d2SAndroid Build Coastguard Worker</pre> 1054*5e7646d2SAndroid Build Coastguard Worker 1055*5e7646d2SAndroid Build Coastguard Worker<P>The directive is followed by the name of the option and any 1056*5e7646d2SAndroid Build Coastguard Workeroptional user text, the option type, the PostScript document group, and 1057*5e7646d2SAndroid Build Coastguard Workerthe sort order number. The option name must conform to the PPD specification 1058*5e7646d2SAndroid Build Coastguard Workerand cannot exceed 40 characters in length. If you specify user text, it 1059*5e7646d2SAndroid Build Coastguard Workercannot exceed 80 characters in length.</P> 1060*5e7646d2SAndroid Build Coastguard Worker 1061*5e7646d2SAndroid Build Coastguard Worker<P>The option type can be <TT>Boolean</TT> for true/false 1062*5e7646d2SAndroid Build Coastguard Workerselections, <TT>PickOne</TT> for picking one of many choices, or 1063*5e7646d2SAndroid Build Coastguard Worker<TT>PickMany</TT> for picking zero or more choices. Boolean 1064*5e7646d2SAndroid Build Coastguard Workeroptions can have at most two choices with the names 1065*5e7646d2SAndroid Build Coastguard Worker<TT>False</TT> and <TT>True</TT>. Pick options can have any 1066*5e7646d2SAndroid Build Coastguard Workernumber of choices, although for Windows compatibility reasons 1067*5e7646d2SAndroid Build Coastguard Workerthe number of choices should not exceed 255.</P> 1068*5e7646d2SAndroid Build Coastguard Worker 1069*5e7646d2SAndroid Build Coastguard Worker<P>The PostScript document group is typically <TT>AnySetup</TT>, 1070*5e7646d2SAndroid Build Coastguard Workermeaning that the option can be introduced at any point in the 1071*5e7646d2SAndroid Build Coastguard WorkerPostScript document. Other values include <TT>PageSetup</TT> to 1072*5e7646d2SAndroid Build Coastguard Workerinclude the option before each page and <TT>DocumentSetup</TT> 1073*5e7646d2SAndroid Build Coastguard Workerto include the option once at the beginning of the document.</P> 1074*5e7646d2SAndroid Build Coastguard Worker 1075*5e7646d2SAndroid Build Coastguard Worker<P>The sort order number is used to sort the printer commands 1076*5e7646d2SAndroid Build Coastguard Workerassociated with each option choice within the PostScript 1077*5e7646d2SAndroid Build Coastguard Workerdocument. This allows you to setup certain options before others 1078*5e7646d2SAndroid Build Coastguard Workeras required by the printer. For most CUPS raster printer 1079*5e7646d2SAndroid Build Coastguard Workerdrivers, the value <TT>10</TT> can be used for all options.</P> 1080*5e7646d2SAndroid Build Coastguard Worker 1081*5e7646d2SAndroid Build Coastguard Worker<P>Once the option is specified, each option choice can be 1082*5e7646d2SAndroid Build Coastguard Workerlisted using the <TT>Choice</TT> directive:</P> 1083*5e7646d2SAndroid Build Coastguard Worker 1084*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1085*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#Choice'>Choice</a> True/Yes "<</cupsCompression 1>>setpagedevice" 1086*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Choice'>Choice</a> False/No "<</cupsCompression 0>>setpagedevice" 1087*5e7646d2SAndroid Build Coastguard Worker</pre> 1088*5e7646d2SAndroid Build Coastguard Worker 1089*5e7646d2SAndroid Build Coastguard Worker<P>The directive is followed by the choice name and optionally 1090*5e7646d2SAndroid Build Coastguard Workeruser text, and the PostScript commands that should be inserted 1091*5e7646d2SAndroid Build Coastguard Workerwhen printing a file to this printer. The option name must 1092*5e7646d2SAndroid Build Coastguard Workerconform to the PPD specification and cannot exceed 40 characters 1093*5e7646d2SAndroid Build Coastguard Workerin length. If you specify user text, it cannot exceed 80 1094*5e7646d2SAndroid Build Coastguard Workercharacters in length.</P> 1095*5e7646d2SAndroid Build Coastguard Worker 1096*5e7646d2SAndroid Build Coastguard Worker<P>The PostScript commands are also interpreted by any RIP 1097*5e7646d2SAndroid Build Coastguard Workerfilters, so these commands typically must be present for all 1098*5e7646d2SAndroid Build Coastguard Workeroption choices. Most commands take the form:</P> 1099*5e7646d2SAndroid Build Coastguard Worker 1100*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1101*5e7646d2SAndroid Build Coastguard Worker<</name value>>setpagedevice 1102*5e7646d2SAndroid Build Coastguard Worker</pre> 1103*5e7646d2SAndroid Build Coastguard Worker 1104*5e7646d2SAndroid Build Coastguard Worker<P>where <TT>name</TT> is the name of the PostScript page device 1105*5e7646d2SAndroid Build Coastguard Workerattribute and <TT>value</TT> is the numeric or string value for 1106*5e7646d2SAndroid Build Coastguard Workerthat attribute.</P> 1107*5e7646d2SAndroid Build Coastguard Worker 1108*5e7646d2SAndroid Build Coastguard Worker 1109*5e7646d2SAndroid Build Coastguard Worker<h3><a name='DEFINE'>Defining Constants</a></h3> 1110*5e7646d2SAndroid Build Coastguard Worker 1111*5e7646d2SAndroid Build Coastguard Worker<P>Sometimes you will want to define constants for your drivers 1112*5e7646d2SAndroid Build Coastguard Workerso that you can share values in different groups within the same 1113*5e7646d2SAndroid Build Coastguard Workerdriver information file, or to share values between different 1114*5e7646d2SAndroid Build Coastguard Workerdriver information files using the <TT>#include</TT> directive. 1115*5e7646d2SAndroid Build Coastguard WorkerThe <TT>#define</TT> directive is used to define constants for 1116*5e7646d2SAndroid Build Coastguard Workeruse in your printer definitions:</P> 1117*5e7646d2SAndroid Build Coastguard Worker 1118*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1119*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_define'>#define</a> NAME value 1120*5e7646d2SAndroid Build Coastguard Worker</pre> 1121*5e7646d2SAndroid Build Coastguard Worker 1122*5e7646d2SAndroid Build Coastguard Worker<P>The <TT>NAME</TT> is any sequence of letters, numbers, and 1123*5e7646d2SAndroid Build Coastguard Workerthe underscore. The <TT>value</TT> is a number or string; if the 1124*5e7646d2SAndroid Build Coastguard Workervalue contains spaces you must put double quotes around it, for 1125*5e7646d2SAndroid Build Coastguard Workerexample:</P> 1126*5e7646d2SAndroid Build Coastguard Worker 1127*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1128*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_define'>#define</a> FOO "My String Value" 1129*5e7646d2SAndroid Build Coastguard Worker</pre> 1130*5e7646d2SAndroid Build Coastguard Worker 1131*5e7646d2SAndroid Build Coastguard Worker<P>Constants can also be defined on the command-line using the <tt>-D</tt> 1132*5e7646d2SAndroid Build Coastguard Workeroption:</P> 1133*5e7646d2SAndroid Build Coastguard Worker 1134*5e7646d2SAndroid Build Coastguard Worker<pre class='command'> 1135*5e7646d2SAndroid Build Coastguard Workerppdc -DNAME="value" filename.drv 1136*5e7646d2SAndroid Build Coastguard Worker</pre> 1137*5e7646d2SAndroid Build Coastguard Worker 1138*5e7646d2SAndroid Build Coastguard Worker<P>Once defined, you use the notation <TT>$NAME</TT> to substitute the value of 1139*5e7646d2SAndroid Build Coastguard Workerthe constant in the file, for example:</P> 1140*5e7646d2SAndroid Build Coastguard Worker 1141*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1142*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_define'>#define</a> MANUFACTURER "Foo" 1143*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_define'>#define</a> FOO_600 0 1144*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_define'>#define</a> FOO_1200 1 1145*5e7646d2SAndroid Build Coastguard Worker 1146*5e7646d2SAndroid Build Coastguard Worker{ 1147*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Manufacturer'>Manufacturer</a> "$MANUFACTURER" 1148*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ModelNumber'>ModelNumber</a> $FOO_600 1149*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet 2000" 1150*5e7646d2SAndroid Build Coastguard Worker ... 1151*5e7646d2SAndroid Build Coastguard Worker} 1152*5e7646d2SAndroid Build Coastguard Worker 1153*5e7646d2SAndroid Build Coastguard Worker{ 1154*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Manufacturer'>Manufacturer</a> "$MANUFACTURER" 1155*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ModelNumber'>ModelNumber</a> $FOO_1200 1156*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet 2001" 1157*5e7646d2SAndroid Build Coastguard Worker ... 1158*5e7646d2SAndroid Build Coastguard Worker} 1159*5e7646d2SAndroid Build Coastguard Worker</pre> 1160*5e7646d2SAndroid Build Coastguard Worker 1161*5e7646d2SAndroid Build Coastguard Worker<P>Numeric constants can be bitwise OR'd together by placing the constants 1162*5e7646d2SAndroid Build Coastguard Workerinside parenthesis, for example:</P> 1163*5e7646d2SAndroid Build Coastguard Worker 1164*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1165*5e7646d2SAndroid Build Coastguard Worker<I>// ModelNumber capability bits</I> 1166*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_define'>#define</a> DUPLEX 1 1167*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_define'>#define</a> COLOR 2 1168*5e7646d2SAndroid Build Coastguard Worker 1169*5e7646d2SAndroid Build Coastguard Worker... 1170*5e7646d2SAndroid Build Coastguard Worker 1171*5e7646d2SAndroid Build Coastguard Worker{ 1172*5e7646d2SAndroid Build Coastguard Worker <I>// Define a model number specifying the capabilities of the printer...</I> 1173*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#ModelNumber'>ModelNumber</a> ($DUPLEX $COLOR) 1174*5e7646d2SAndroid Build Coastguard Worker ... 1175*5e7646d2SAndroid Build Coastguard Worker} 1176*5e7646d2SAndroid Build Coastguard Worker</pre> 1177*5e7646d2SAndroid Build Coastguard Worker 1178*5e7646d2SAndroid Build Coastguard Worker 1179*5e7646d2SAndroid Build Coastguard Worker<h3><a name='CONDITIONAL'>Conditional Statements</a></h3> 1180*5e7646d2SAndroid Build Coastguard Worker 1181*5e7646d2SAndroid Build Coastguard Worker<p>The PPD compiler supports conditional compilation using the <tt>#if</tt>, 1182*5e7646d2SAndroid Build Coastguard Worker<tt>#elif</tt>, <tt>#else</tt>, and <tt>#endif</tt> directives. The <tt>#if</tt> 1183*5e7646d2SAndroid Build Coastguard Workerand <tt>#elif</tt> directives are followed by a constant name or an expression. 1184*5e7646d2SAndroid Build Coastguard WorkerFor example, to include a group of options when "ADVANCED" is defined:</p> 1185*5e7646d2SAndroid Build Coastguard Worker 1186*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1187*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_if'>#if</a> ADVANCED 1188*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Group'>Group</a> "Advanced/Advanced Options" 1189*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Option'>Option</a> "fooCyanAdjust/Cyan Adjustment" 1190*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "plus10/+10%" "" 1191*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "plus5/+5%" "" 1192*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Choice'>Choice</a> "none/No Adjustment" "" 1193*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "minus5/-5%" "" 1194*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "minus10/-10%" "" 1195*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Option'>Option</a> "fooMagentaAdjust/Magenta Adjustment" 1196*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "plus10/+10%" "" 1197*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "plus5/+5%" "" 1198*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Choice'>Choice</a> "none/No Adjustment" "" 1199*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "minus5/-5%" "" 1200*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "minus10/-10%" "" 1201*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Option'>Option</a> "fooYellowAdjust/Yellow Adjustment" 1202*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "plus10/+10%" "" 1203*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "plus5/+5%" "" 1204*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Choice'>Choice</a> "none/No Adjustment" "" 1205*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "minus5/-5%" "" 1206*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "minus10/-10%" "" 1207*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Option'>Option</a> "fooBlackAdjust/Black Adjustment" 1208*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "plus10/+10%" "" 1209*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "plus5/+5%" "" 1210*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Choice'>Choice</a> "none/No Adjustment" "" 1211*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "minus5/-5%" "" 1212*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "minus10/-10%" "" 1213*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_endif'>#endif</a> 1214*5e7646d2SAndroid Build Coastguard Worker</pre> 1215*5e7646d2SAndroid Build Coastguard Worker 1216*5e7646d2SAndroid Build Coastguard Worker 1217*5e7646d2SAndroid Build Coastguard Worker<h3><a name='CONSTRAINTS'>Defining Constraints</a></h3> 1218*5e7646d2SAndroid Build Coastguard Worker 1219*5e7646d2SAndroid Build Coastguard Worker<P>Constraints are strings that are used to specify that one or more option 1220*5e7646d2SAndroid Build Coastguard Workerchoices are incompatible, for example two-sided printing on transparency media. 1221*5e7646d2SAndroid Build Coastguard WorkerConstraints are also used to prevent the use of uninstalled features such as the 1222*5e7646d2SAndroid Build Coastguard Workerduplexer unit, additional media trays, and so forth.</P> 1223*5e7646d2SAndroid Build Coastguard Worker 1224*5e7646d2SAndroid Build Coastguard Worker<P>The <TT>UIConstraints</TT> directive is used to specify a constraint that is 1225*5e7646d2SAndroid Build Coastguard Workerplaced in the PPD file. The directive is followed by a string using one of the 1226*5e7646d2SAndroid Build Coastguard Workerfollowing formats:</P> 1227*5e7646d2SAndroid Build Coastguard Worker 1228*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1229*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#UIConstraints'>UIConstraints</a> "*Option1 *Option2" 1230*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#UIConstraints'>UIConstraints</a> "*Option1 Choice1 *Option2" 1231*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#UIConstraints'>UIConstraints</a> "*Option1 *Option2 Choice2" 1232*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#UIConstraints'>UIConstraints</a> "*Option1 Choice1 *Option2 Choice2" 1233*5e7646d2SAndroid Build Coastguard Worker</pre> 1234*5e7646d2SAndroid Build Coastguard Worker 1235*5e7646d2SAndroid Build Coastguard Worker<P>Each option name is preceded by the asterisk (<TT>*</TT>). If no choice is 1236*5e7646d2SAndroid Build Coastguard Workergiven for an option, then all choices <I>except</I> <TT>False</TT> and 1237*5e7646d2SAndroid Build Coastguard Worker<TT>None</TT> will conflict with the other option and choice(s). Since the PPD 1238*5e7646d2SAndroid Build Coastguard Workercompiler automatically adds reciprocal constraints (option A conflicts with 1239*5e7646d2SAndroid Build Coastguard Workeroption B, so therefore option B conflicts with option A), you need only specify 1240*5e7646d2SAndroid Build Coastguard Workerthe constraint once.</P> 1241*5e7646d2SAndroid Build Coastguard Worker 1242*5e7646d2SAndroid Build Coastguard Worker<p class='example'><a name="LISTING5">Listing 5: "examples/constraint.drv"</a></p> 1243*5e7646d2SAndroid Build Coastguard Worker 1244*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1245*5e7646d2SAndroid Build Coastguard Worker 1246*5e7646d2SAndroid Build Coastguard Worker<I>// Include standard font and media definitions</I> 1247*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <font.defs> 1248*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <media.defs> 1249*5e7646d2SAndroid Build Coastguard Worker 1250*5e7646d2SAndroid Build Coastguard Worker<I>// List the fonts that are supported, in this case all standard fonts...</I> 1251*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Font'>Font</a> * 1252*5e7646d2SAndroid Build Coastguard Worker 1253*5e7646d2SAndroid Build Coastguard Worker<I>// Manufacturer, model name, and version</I> 1254*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Manufacturer'>Manufacturer</a> "Foo" 1255*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#ModelName'>ModelName</a> "FooJet 2000" 1256*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Version'>Version</a> 1.0 1257*5e7646d2SAndroid Build Coastguard Worker 1258*5e7646d2SAndroid Build Coastguard Worker<I>// Each filter provided by the driver...</I> 1259*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/vnd.cups-raster 100 rastertofoo 1260*5e7646d2SAndroid Build Coastguard Worker 1261*5e7646d2SAndroid Build Coastguard Worker<I>// Supported page sizes</I> 1262*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> Letter 1263*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> A4 1264*5e7646d2SAndroid Build Coastguard Worker 1265*5e7646d2SAndroid Build Coastguard Worker<I>// Supported resolutions</I> 1266*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#Resolution'>Resolution</a> k 8 0 0 0 "600dpi/600 DPI" 1267*5e7646d2SAndroid Build Coastguard Worker 1268*5e7646d2SAndroid Build Coastguard Worker<I>// Installable Option Group</I> 1269*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Group'>Group</a> "InstallableOptions/Options Installed" 1270*5e7646d2SAndroid Build Coastguard Worker 1271*5e7646d2SAndroid Build Coastguard Worker <I>// Duplexing unit option</I> 1272*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Option'>Option</a> "OptionDuplexer/Duplexing Unit" Boolean AnySetup 10 1273*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> True/Installed "" 1274*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Choice'>Choice</a> "False/Not Installed" "" 1275*5e7646d2SAndroid Build Coastguard Worker 1276*5e7646d2SAndroid Build Coastguard Worker<I>// General Option Group</I> 1277*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Group'>Group</a> General 1278*5e7646d2SAndroid Build Coastguard Worker 1279*5e7646d2SAndroid Build Coastguard Worker <I>// Duplexing option</I> 1280*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Option'>Option</a> "Duplex/Two-Sided Printing" PickOne AnySetup 10 1281*5e7646d2SAndroid Build Coastguard Worker *<a href='ref-ppdcfile.html#Choice'>Choice</a> "None/No" "<</Duplex false>>setpagedevice"" 1282*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "DuplexNoTumble/Long Edge Binding" 1283*5e7646d2SAndroid Build Coastguard Worker "<</Duplex true/Tumble false>>setpagedevice"" 1284*5e7646d2SAndroid Build Coastguard Worker <a href='ref-ppdcfile.html#Choice'>Choice</a> "DuplexTumble/Short Edge Binding" 1285*5e7646d2SAndroid Build Coastguard Worker "<</Duplex true/Tumble true>>setpagedevice"" 1286*5e7646d2SAndroid Build Coastguard Worker 1287*5e7646d2SAndroid Build Coastguard Worker<I>// Only allow duplexing if the duplexer is installed</I> 1288*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#UIConstraints'>UIConstraints</a> "*Duplex *OptionDuplexer False" 1289*5e7646d2SAndroid Build Coastguard Worker 1290*5e7646d2SAndroid Build Coastguard Worker<I>// Specify the name of the PPD file we want to generate...</I> 1291*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#PCFileName'>PCFileName</a> "foojet2k.ppd" 1292*5e7646d2SAndroid Build Coastguard Worker</pre> 1293*5e7646d2SAndroid Build Coastguard Worker 1294*5e7646d2SAndroid Build Coastguard Worker<P><A HREF="#LISTING5">Listing 5</A> shows a variation of the first example with 1295*5e7646d2SAndroid Build Coastguard Workeran added <TT>Duplex</TT> option and installable option for the duplexer, 1296*5e7646d2SAndroid Build Coastguard Worker<TT>OptionDuplex</TT>. A constraint is added at the end to specify that any 1297*5e7646d2SAndroid Build Coastguard Workerchoice of the <TT>Duplex</TT> option that is not <TT>None</TT> is incompatible 1298*5e7646d2SAndroid Build Coastguard Workerwith the "Duplexer Installed" option set to "Not Installed" 1299*5e7646d2SAndroid Build Coastguard Worker(<TT>False</TT>):</P> 1300*5e7646d2SAndroid Build Coastguard Worker 1301*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1302*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#UIConstraints'>UIConstraints</a> "*Duplex *OptionDuplexer False" 1303*5e7646d2SAndroid Build Coastguard Worker</pre> 1304*5e7646d2SAndroid Build Coastguard Worker 1305*5e7646d2SAndroid Build Coastguard Worker<h4>Enhanced Constraints</h4> 1306*5e7646d2SAndroid Build Coastguard Worker 1307*5e7646d2SAndroid Build Coastguard Worker<p>CUPS 1.4 supports constraints between 2 or more options using the 1308*5e7646d2SAndroid Build Coastguard Worker<TT>Attribute</TT> directive. <TT>cupsUIConstraints</TT> attributes define 1309*5e7646d2SAndroid Build Coastguard Workerthe constraints, while <TT>cupsUIResolver</TT> attributes define option changes 1310*5e7646d2SAndroid Build Coastguard Workerto resolve constraints. For example, we can specify the previous duplex 1311*5e7646d2SAndroid Build Coastguard Workerconstraint with a resolver that turns off duplexing with the following two 1312*5e7646d2SAndroid Build Coastguard Workerlines:</p> 1313*5e7646d2SAndroid Build Coastguard Worker 1314*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1315*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsUIConstraints DuplexOff "*Duplex *OptionDuplexer False" 1316*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsUIResolver DuplexOff "*Duplex None" 1317*5e7646d2SAndroid Build Coastguard Worker</pre> 1318*5e7646d2SAndroid Build Coastguard Worker 1319*5e7646d2SAndroid Build Coastguard Worker<h2 class='title'><a name='LOCALIZATION'>Localization</a></h2> 1320*5e7646d2SAndroid Build Coastguard Worker 1321*5e7646d2SAndroid Build Coastguard Worker<p>The PPD compiler provides localization of PPD files in different languages 1322*5e7646d2SAndroid Build Coastguard Workerthrough <i>message catalog</i> files in the GNU gettext or Apple .strings 1323*5e7646d2SAndroid Build Coastguard Workerformats. Each user text string and several key PPD attribute values such as 1324*5e7646d2SAndroid Build Coastguard Worker<tt>LanguageVersion</tt> and <tt>LanguageEncoding</tt> are looked up in the 1325*5e7646d2SAndroid Build Coastguard Workercorresponding message catalog and the translated text is substituted in the 1326*5e7646d2SAndroid Build Coastguard Workergenerated PPD files. One message catalog file can be used by multiple driver 1327*5e7646d2SAndroid Build Coastguard Workerinformation files, and each file contains a single language translation.</p> 1328*5e7646d2SAndroid Build Coastguard Worker 1329*5e7646d2SAndroid Build Coastguard Worker<h3><a name='PPDPO'>The ppdpo Utility</a></h3> 1330*5e7646d2SAndroid Build Coastguard Worker 1331*5e7646d2SAndroid Build Coastguard Worker<p>While CUPS includes localizations of all standard media sizes and options in 1332*5e7646d2SAndroid Build Coastguard Workerseveral languages, your driver information files may provide their own media 1333*5e7646d2SAndroid Build Coastguard Workersizes and options that need to be localized. CUPS provides a utility program to 1334*5e7646d2SAndroid Build Coastguard Workeraid in the localization of drivers called <a 1335*5e7646d2SAndroid Build Coastguard Workerhref='man-ppdpo.html'><tt>ppdpo(1)</tt></a>. The <tt>ppdpo</tt> program creates 1336*5e7646d2SAndroid Build Coastguard Workeror updates a message catalog file based upon one or more driver information 1337*5e7646d2SAndroid Build Coastguard Workerfiles. New messages are added with the word "TRANSLATE" added to the front of 1338*5e7646d2SAndroid Build Coastguard Workerthe translation string to make locating new strings for translation easier. The 1339*5e7646d2SAndroid Build Coastguard Workerprogram accepts the message catalog filename and one or more driver information 1340*5e7646d2SAndroid Build Coastguard Workerfiles.</p> 1341*5e7646d2SAndroid Build Coastguard Worker 1342*5e7646d2SAndroid Build Coastguard Worker<p>For example, run the following command to create a new German message catalog 1343*5e7646d2SAndroid Build Coastguard Workercalled <var>de.po</var> for all of the driver information files in the current 1344*5e7646d2SAndroid Build Coastguard Workerdirectory:</p> 1345*5e7646d2SAndroid Build Coastguard Worker 1346*5e7646d2SAndroid Build Coastguard Worker<pre class='command'> 1347*5e7646d2SAndroid Build Coastguard Workerppdpo -o de.po *.drv 1348*5e7646d2SAndroid Build Coastguard Worker</pre> 1349*5e7646d2SAndroid Build Coastguard Worker 1350*5e7646d2SAndroid Build Coastguard Worker<p>If the file <var>de.po</var> already exists, <tt>ppdpo</tt> will update the 1351*5e7646d2SAndroid Build Coastguard Workercontents of the file with any new messages that need to be translated. To create 1352*5e7646d2SAndroid Build Coastguard Workeran Apple .strings file instead, specify the output filename with a .strings 1353*5e7646d2SAndroid Build Coastguard Workerextension, for example:</p> 1354*5e7646d2SAndroid Build Coastguard Worker 1355*5e7646d2SAndroid Build Coastguard Worker<pre class='command'> 1356*5e7646d2SAndroid Build Coastguard Workerppdpo -o de.strings *.drv 1357*5e7646d2SAndroid Build Coastguard Worker</pre> 1358*5e7646d2SAndroid Build Coastguard Worker 1359*5e7646d2SAndroid Build Coastguard Worker<h3><a name='PPDC_CATALOG'>Using Message Catalogs with the PPD Compiler</a></h3> 1360*5e7646d2SAndroid Build Coastguard Worker 1361*5e7646d2SAndroid Build Coastguard Worker<p>Once you have created a message catalog, use the <a 1362*5e7646d2SAndroid Build Coastguard Workerhref='ref-ppdcfile.html#_po'><tt>#po</tt></a> directive to declare it in each 1363*5e7646d2SAndroid Build Coastguard Workerdriver information file. For example, to declare the German message catalog for 1364*5e7646d2SAndroid Build Coastguard Workera driver use:</p> 1365*5e7646d2SAndroid Build Coastguard Worker 1366*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1367*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_po'>#po</a> de "de.po" // German 1368*5e7646d2SAndroid Build Coastguard Worker</pre> 1369*5e7646d2SAndroid Build Coastguard Worker 1370*5e7646d2SAndroid Build Coastguard Worker<p>In fact, you can use the <tt>#po</tt> directive as many times as needed:</p> 1371*5e7646d2SAndroid Build Coastguard Worker 1372*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 1373*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_po'>#po</a> de "de.po" // German 1374*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_po'>#po</a> es "es.po" // Spanish 1375*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_po'>#po</a> fr "fr.po" // French 1376*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_po'>#po</a> it "it.po" // Italian 1377*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_po'>#po</a> ja "ja.po" // Japanese 1378*5e7646d2SAndroid Build Coastguard Worker</pre> 1379*5e7646d2SAndroid Build Coastguard Worker 1380*5e7646d2SAndroid Build Coastguard Worker<p>The filename ("de.po", etc.) can be relative to the location of the driver 1381*5e7646d2SAndroid Build Coastguard Workerinformation file or an absolute path. Once defined, the PPD compiler will 1382*5e7646d2SAndroid Build Coastguard Workerautomatically generate a globalized PPD for every language declared in your 1383*5e7646d2SAndroid Build Coastguard Workerdriver information file. To generate a single-language PPD file, simply use the 1384*5e7646d2SAndroid Build Coastguard Worker<tt>-l</tt> option to list the corresponding locale, for example:</p> 1385*5e7646d2SAndroid Build Coastguard Worker 1386*5e7646d2SAndroid Build Coastguard Worker<pre class='command'> 1387*5e7646d2SAndroid Build Coastguard Workerppdc -l de -d ppd/de mydrivers.drv 1388*5e7646d2SAndroid Build Coastguard Worker</pre> 1389*5e7646d2SAndroid Build Coastguard Worker 1390*5e7646d2SAndroid Build Coastguard Worker<p>to generate German PPD files.</p> 1391*5e7646d2SAndroid Build Coastguard Worker </div> 1392*5e7646d2SAndroid Build Coastguard Worker </body> 1393*5e7646d2SAndroid Build Coastguard Worker</html> 1394