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>Developing PostScript Printer Drivers</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 PostScript printer driver 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'>Developing PostScript Printer Drivers</h1> 464*5e7646d2SAndroid Build Coastguard Worker 465*5e7646d2SAndroid Build Coastguard Worker<p>This document describes how to develop printer drivers for PostScript printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#IMPORT'>importing existing PPD files</a>, <a href='#FILTERS'>using custom filters</a>, <a href='#COLOR'>implementing color management</a>, and <a href='#MACOSX'>adding macOS features</a>.</p> 466*5e7646d2SAndroid Build Coastguard Worker 467*5e7646d2SAndroid Build Coastguard Worker<div class='summary'><table summary='General Information'> 468*5e7646d2SAndroid Build Coastguard Worker<tbody> 469*5e7646d2SAndroid Build Coastguard Worker<tr> 470*5e7646d2SAndroid Build Coastguard Worker <th>See Also</th> 471*5e7646d2SAndroid Build Coastguard Worker <td>Programming: <a href='raster-driver.html'>Developing Raster Printer Drivers</a><br> 472*5e7646d2SAndroid Build Coastguard Worker Programming: <a href='api-filter.html'>Filter and Backend Programming</a><br> 473*5e7646d2SAndroid Build Coastguard Worker Programming: <a href='ppd-compiler.html'>Introduction to the PPD Compiler</a><br> 474*5e7646d2SAndroid Build Coastguard Worker Programming: <a href='api-raster.html'>Raster API</a><br> 475*5e7646d2SAndroid Build Coastguard Worker References: <a href='ref-ppdcfile.html'>PPD Compiler Driver Information File Reference</a><br> 476*5e7646d2SAndroid Build Coastguard Worker Specifications: <a href='spec-ppd.html'>CUPS PPD Extensions</a></td> 477*5e7646d2SAndroid Build Coastguard Worker</tr> 478*5e7646d2SAndroid Build Coastguard Worker</tbody> 479*5e7646d2SAndroid Build Coastguard Worker</table></div> 480*5e7646d2SAndroid Build Coastguard Worker <div class="contents"> 481*5e7646d2SAndroid Build Coastguard Worker <h2 class="title">Contents</h2> 482*5e7646d2SAndroid Build Coastguard Worker <ul class="contents"> 483*5e7646d2SAndroid Build Coastguard Worker <li><a href="#BASICS">Printer Driver Basics</a></li> 484*5e7646d2SAndroid Build Coastguard Worker <li><a href="#CREATING">Creating New PPD Files</a><ul class="subcontents"> 485*5e7646d2SAndroid Build Coastguard Worker <li><a href="#IMPORT">Importing Existing PPD Files</a></li> 486*5e7646d2SAndroid Build Coastguard Worker </ul></li> 487*5e7646d2SAndroid Build Coastguard Worker <li><a href="#FILTERS">Using Custom Filters</a></li> 488*5e7646d2SAndroid Build Coastguard Worker <li><a href="#COLOR">Implementing Color Management</a></li> 489*5e7646d2SAndroid Build Coastguard Worker <li><a href="#MACOSX">Adding macOS Features</a></li> 490*5e7646d2SAndroid Build Coastguard Worker </ul> 491*5e7646d2SAndroid Build Coastguard Worker </div> 492*5e7646d2SAndroid Build Coastguard Worker <div class="body"> 493*5e7646d2SAndroid Build Coastguard Worker<h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2> 494*5e7646d2SAndroid Build Coastguard Worker 495*5e7646d2SAndroid Build Coastguard Worker<p>A CUPS PostScript printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, zero or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p> 496*5e7646d2SAndroid Build Coastguard Worker 497*5e7646d2SAndroid Build Coastguard Worker<p>Every time a user prints something the scheduler program, <a href='man-cupsd.html'>cupsd(8)</a>, determines the format of the print job and the programs required to convert that job into something the printer understands. CUPS includes filter programs for many common formats, for example to convert Portable Document Format (PDF) files into device-independent PostScript, and then from device-independent PostScript to device-dependent PostScript. <a href='#FIGURE_1'>Figure 1</a> shows the data flow of a typical print job.</p> 498*5e7646d2SAndroid Build Coastguard Worker 499*5e7646d2SAndroid Build Coastguard Worker<div class='figure'><table summary='PostScript Filter Chain'> 500*5e7646d2SAndroid Build Coastguard Worker<caption>Figure 1: <a name='FIGURE_1'>PostScript Filter Chain</a></caption> 501*5e7646d2SAndroid Build Coastguard Worker<tr><td><img src='../images/cups-postscript-chain.png' width='700' height='150' alt='PostScript Filter Chain'></td></tr> 502*5e7646d2SAndroid Build Coastguard Worker</table></div> 503*5e7646d2SAndroid Build Coastguard Worker 504*5e7646d2SAndroid Build Coastguard Worker<p>The optional PostScript filter can be provided to add printer-specific commands to the PostScript output that cannot be represented in the PPD file or to reorganize the output for special printer features. Typically this is used to support advanced job management or finishing functions on the printer. CUPS includes a generic PostScript filter that handles all PPD-defined commands.</p> 505*5e7646d2SAndroid Build Coastguard Worker 506*5e7646d2SAndroid Build Coastguard Worker<p>The optional port monitor handles interface-specific protocol or encoding issues. For example, many PostScript printers support the Binary Communications Protocol (BCP) and Tagged Binary Communications Protocol (TBCP) to allow applications to print 8-bit ("binary") PostScript jobs. CUPS includes port monitors for BCP and TBCP, and you can supply your own port monitors as needed.</p> 507*5e7646d2SAndroid Build Coastguard Worker 508*5e7646d2SAndroid Build Coastguard Worker<p>The backend handles communications with the printer, sending print data from the last filter to the printer and relaying back-channel data from the printer to the upstream filters. CUPS includes backend programs for common direct-connect interfaces and network protocols, and you can provide your own backend to support custom interfaces and protocols.</p> 509*5e7646d2SAndroid Build Coastguard Worker 510*5e7646d2SAndroid Build Coastguard Worker<p>The scheduler also supports a special "command" file format for sending maintenance commands and status queries to a printer or printer driver. Command print jobs typically use a single command filter program defined in the PPD file to generate the appropriate printer commands and handle any responses from the printer. <a href='#FIGURE_2'>Figure 2</a> shows the data flow of a typical command job.</p> 511*5e7646d2SAndroid Build Coastguard Worker 512*5e7646d2SAndroid Build Coastguard Worker<div class='figure'><table summary='Command Filter Chain'> 513*5e7646d2SAndroid Build Coastguard Worker<caption>Figure 2: <a name='FIGURE_2'>Command Filter Chain</a></caption> 514*5e7646d2SAndroid Build Coastguard Worker<tr><td><img src='../images/cups-command-chain.png' width='575' height='150' alt='Command Filter Chain'></td></tr> 515*5e7646d2SAndroid Build Coastguard Worker</table></div> 516*5e7646d2SAndroid Build Coastguard Worker 517*5e7646d2SAndroid Build Coastguard Worker<p>PostScript printer drivers typically do not require their own command filter since CUPS includes a generic PostScript command filter that supports all of the standard functions using PPD-defined commands.</p> 518*5e7646d2SAndroid Build Coastguard Worker 519*5e7646d2SAndroid Build Coastguard Worker 520*5e7646d2SAndroid Build Coastguard Worker<h2 class='title'><a name='CREATING'>Creating New PPD Files</a></h2> 521*5e7646d2SAndroid Build Coastguard Worker 522*5e7646d2SAndroid Build Coastguard Worker<p>We recommend using the CUPS PPD compiler, <a href='man-ppdc.html'>ppdc(1)</a>, to create new PPD files since it manages many of the tedious (and error-prone!) details of paper sizes and localization for you. It also allows you to easily support multiple devices from a single source file. For more information see the "<a href='ppd-compiler.html'>Introduction to the PPD Compiler</a>" document. <a href='#LISTING_1'>Listing 1</a> shows a driver information file for a black-and-white PostScript printer.</p> 523*5e7646d2SAndroid Build Coastguard Worker 524*5e7646d2SAndroid Build Coastguard Worker<p class='example'>Listing 1: <a name='LISTING_1'>"examples/postscript.drv"</a></p> 525*5e7646d2SAndroid Build Coastguard Worker 526*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 527*5e7646d2SAndroid Build Coastguard Worker// Include standard font and media definitions 528*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <font.defs> 529*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#_include'>#include</a> <media.defs> 530*5e7646d2SAndroid Build Coastguard Worker 531*5e7646d2SAndroid Build Coastguard Worker// Specify this is a PostScript printer driver 532*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#DriverType'>DriverType</a> ps 533*5e7646d2SAndroid Build Coastguard Worker 534*5e7646d2SAndroid Build Coastguard Worker// List the fonts that are supported, in this case all standard fonts 535*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Font'>Font</a> * 536*5e7646d2SAndroid Build Coastguard Worker 537*5e7646d2SAndroid Build Coastguard Worker// Manufacturer, model name, and version 538*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Manufacturer'>Manufacturer</a> "Foo" 539*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#ModelName'>ModelName</a> "Foo LaserProofer 2000" 540*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Version'>Version</a> 1.0 541*5e7646d2SAndroid Build Coastguard Worker 542*5e7646d2SAndroid Build Coastguard Worker// PostScript printer attributes 543*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> DefaultColorSpace "" Gray 544*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> LandscapeOrientation "" Minus90 545*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> LanguageLevel "" "3" 546*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> Product "" "(Foo LaserProofer 2000)" 547*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> PSVersion "" "(3010) 0" 548*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> TTRasterizer "" Type42 549*5e7646d2SAndroid Build Coastguard Worker 550*5e7646d2SAndroid Build Coastguard Worker// Supported page sizes 551*5e7646d2SAndroid Build Coastguard Worker*<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> Letter 552*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> Legal 553*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#MediaSize'>MediaSize</a> A4 554*5e7646d2SAndroid Build Coastguard Worker 555*5e7646d2SAndroid Build Coastguard Worker// Query command for page size 556*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> "?PageSize" "" " 557*5e7646d2SAndroid Build Coastguard Worker save 558*5e7646d2SAndroid Build Coastguard Worker currentpagedevice /PageSize get aload pop 559*5e7646d2SAndroid Build Coastguard Worker 2 copy gt {exch} if (Unknown) 560*5e7646d2SAndroid Build Coastguard Worker 23 dict 561*5e7646d2SAndroid Build Coastguard Worker dup [612 792] (Letter) put 562*5e7646d2SAndroid Build Coastguard Worker dup [612 1008] (Legal) put 563*5e7646d2SAndroid Build Coastguard Worker dup [595 842] (A4) put 564*5e7646d2SAndroid Build Coastguard Worker {exch aload pop 4 index sub abs 5 le exch 565*5e7646d2SAndroid Build Coastguard Worker 5 index sub abs 5 le and 566*5e7646d2SAndroid Build Coastguard Worker {exch pop exit} {pop} ifelse 567*5e7646d2SAndroid Build Coastguard Worker } bind forall = flush pop pop 568*5e7646d2SAndroid Build Coastguard Worker restore" 569*5e7646d2SAndroid Build Coastguard Worker 570*5e7646d2SAndroid Build Coastguard Worker// Specify the name of the PPD file we want to generate 571*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#PCFileName'>PCFileName</a> "fooproof.ppd" 572*5e7646d2SAndroid Build Coastguard Worker</pre> 573*5e7646d2SAndroid Build Coastguard Worker 574*5e7646d2SAndroid Build Coastguard Worker<h3>Required Attributes</h3> 575*5e7646d2SAndroid Build Coastguard Worker 576*5e7646d2SAndroid Build Coastguard Worker<p>PostScript drivers require the attributes listed in <a href='#TABLE_1'>Table 1</a>. If not specified, the defaults for CUPS drivers are used. A typical PostScript driver information file would include the following attributes:</p> 577*5e7646d2SAndroid Build Coastguard Worker 578*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 579*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> DefaultColorSpace "" Gray 580*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> LandscapeOrientation "" Minus90 581*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> LanguageLevel "" "3" 582*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> Product "" "(Foo LaserProofer 2000)" 583*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> PSVersion "" "(3010) 0" 584*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> TTRasterizer "" Type42 585*5e7646d2SAndroid Build Coastguard Worker</pre> 586*5e7646d2SAndroid Build Coastguard Worker 587*5e7646d2SAndroid Build Coastguard Worker<div class='table'><table summary='Required PostScript Printer Driver Attributes'> 588*5e7646d2SAndroid Build Coastguard Worker<caption>Table 1: <a name='TABLE_1'>Required PostScript Printer Driver Attributes</a></caption> 589*5e7646d2SAndroid Build Coastguard Worker<thead> 590*5e7646d2SAndroid Build Coastguard Worker<tr> 591*5e7646d2SAndroid Build Coastguard Worker <th>Attribute</th> 592*5e7646d2SAndroid Build Coastguard Worker <th>Description</th> 593*5e7646d2SAndroid Build Coastguard Worker</tr> 594*5e7646d2SAndroid Build Coastguard Worker</thead> 595*5e7646d2SAndroid Build Coastguard Worker<tbody> 596*5e7646d2SAndroid Build Coastguard Worker<tr> 597*5e7646d2SAndroid Build Coastguard Worker <td><tt>DefaultColorSpace</tt></td> 598*5e7646d2SAndroid Build Coastguard Worker <td>The default colorspace: 599*5e7646d2SAndroid Build Coastguard Worker <tt>Gray</tt>, <tt>RGB</tt>, <tt>CMY</tt>, or 600*5e7646d2SAndroid Build Coastguard Worker <tt>CMYK</tt>. If not specified, then <tt>RGB</tt> is 601*5e7646d2SAndroid Build Coastguard Worker assumed.</td> 602*5e7646d2SAndroid Build Coastguard Worker</tr> 603*5e7646d2SAndroid Build Coastguard Worker<tr> 604*5e7646d2SAndroid Build Coastguard Worker <td><tt>LandscapeOrientation</tt></td> 605*5e7646d2SAndroid Build Coastguard Worker <td>The preferred landscape 606*5e7646d2SAndroid Build Coastguard Worker orientation: <tt>Plus90</tt>, <tt>Minus90</tt>, or 607*5e7646d2SAndroid Build Coastguard Worker <tt>Any</tt>. If not specified, <tt>Plus90</tt> is 608*5e7646d2SAndroid Build Coastguard Worker assumed.</td> 609*5e7646d2SAndroid Build Coastguard Worker</tr> 610*5e7646d2SAndroid Build Coastguard Worker<tr> 611*5e7646d2SAndroid Build Coastguard Worker <td><tt>LanguageLevel</tt></td> 612*5e7646d2SAndroid Build Coastguard Worker <td>The PostScript language 613*5e7646d2SAndroid Build Coastguard Worker level supported by the device: 1, 2, or 3. If not 614*5e7646d2SAndroid Build Coastguard Worker specified, 2 is assumed.</td> 615*5e7646d2SAndroid Build Coastguard Worker</tr> 616*5e7646d2SAndroid Build Coastguard Worker<tr> 617*5e7646d2SAndroid Build Coastguard Worker <td><tt>Product</tt></td> 618*5e7646d2SAndroid Build Coastguard Worker <td>The string returned by 619*5e7646d2SAndroid Build Coastguard Worker the PostScript <tt>product</tt> operator, which 620*5e7646d2SAndroid Build Coastguard Worker <i>must</i> include parenthesis to conform with 621*5e7646d2SAndroid Build Coastguard Worker PostScript syntax rules for strings. Multiple 622*5e7646d2SAndroid Build Coastguard Worker <tt>Product</tt> attributes may be specified to support 623*5e7646d2SAndroid Build Coastguard Worker multiple products with the same PPD file. If not 624*5e7646d2SAndroid Build Coastguard Worker specified, "(ESP Ghostscript)" and "(GNU Ghostscript)" 625*5e7646d2SAndroid Build Coastguard Worker are assumed.</td> 626*5e7646d2SAndroid Build Coastguard Worker</tr> 627*5e7646d2SAndroid Build Coastguard Worker<tr> 628*5e7646d2SAndroid Build Coastguard Worker <td><tt>PSVersion</tt></td> 629*5e7646d2SAndroid Build Coastguard Worker <td>The PostScript 630*5e7646d2SAndroid Build Coastguard Worker interpreter version numbers as returned by the 631*5e7646d2SAndroid Build Coastguard Worker <tt>version</tt> and <tt>revision</tt> operators. The 632*5e7646d2SAndroid Build Coastguard Worker required format is "(version) revision". Multiple 633*5e7646d2SAndroid Build Coastguard Worker <tt>PSVersion</tt> attributes may be specified to 634*5e7646d2SAndroid Build Coastguard Worker support multiple interpreter version numbers. If not 635*5e7646d2SAndroid Build Coastguard Worker specified, "(3010) 705" and "(3010) 707" are 636*5e7646d2SAndroid Build Coastguard Worker assumed.</td> 637*5e7646d2SAndroid Build Coastguard Worker</tr> 638*5e7646d2SAndroid Build Coastguard Worker<tr> 639*5e7646d2SAndroid Build Coastguard Worker <td><tt>TTRasterizer</tt></td> 640*5e7646d2SAndroid Build Coastguard Worker <td>The type of TrueType 641*5e7646d2SAndroid Build Coastguard Worker font rasterizer supported by the device, if any. The 642*5e7646d2SAndroid Build Coastguard Worker supported values are <tt>None</tt>, <tt>Accept68k</tt>, 643*5e7646d2SAndroid Build Coastguard Worker <tt>Type42</tt>, and <tt>TrueImage</tt>. If not 644*5e7646d2SAndroid Build Coastguard Worker specified, <tt>None</tt> is assumed.</td> 645*5e7646d2SAndroid Build Coastguard Worker</tr> 646*5e7646d2SAndroid Build Coastguard Worker</table></div> 647*5e7646d2SAndroid Build Coastguard Worker 648*5e7646d2SAndroid Build Coastguard Worker<h3>Query Commands</h3> 649*5e7646d2SAndroid Build Coastguard Worker 650*5e7646d2SAndroid Build Coastguard Worker<p>Most PostScript printer PPD files include query commands (<tt>?PageSize</tt>, etc.) that allow applications to query the printer for its current settings and configuration. Query commands are included in driver information files as attributes. For example, the example in <a href='#LISTING_1'>Listing 1</a> uses the following definition for the <tt>PageSize</tt> query command:</p> 651*5e7646d2SAndroid Build Coastguard Worker 652*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 653*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> "?PageSize" "" " 654*5e7646d2SAndroid Build Coastguard Worker save 655*5e7646d2SAndroid Build Coastguard Worker currentpagedevice /PageSize get aload pop 656*5e7646d2SAndroid Build Coastguard Worker 2 copy gt {exch} if (Unknown) 657*5e7646d2SAndroid Build Coastguard Worker 23 dict 658*5e7646d2SAndroid Build Coastguard Worker dup [612 792] (Letter) put 659*5e7646d2SAndroid Build Coastguard Worker dup [612 1008] (Legal) put 660*5e7646d2SAndroid Build Coastguard Worker dup [595 842] (A4) put 661*5e7646d2SAndroid Build Coastguard Worker {exch aload pop 4 index sub abs 5 le exch 662*5e7646d2SAndroid Build Coastguard Worker 5 index sub abs 5 le and 663*5e7646d2SAndroid Build Coastguard Worker {exch pop exit} {pop} ifelse 664*5e7646d2SAndroid Build Coastguard Worker } bind forall = flush pop pop 665*5e7646d2SAndroid Build Coastguard Worker restore" 666*5e7646d2SAndroid Build Coastguard Worker</pre> 667*5e7646d2SAndroid Build Coastguard Worker 668*5e7646d2SAndroid Build Coastguard Worker<p>Query commands can span multiple lines, however no single line may contain more than 255 characters.</p> 669*5e7646d2SAndroid Build Coastguard Worker 670*5e7646d2SAndroid Build Coastguard Worker<h3><a name='IMPORT'>Importing Existing PPD Files</a></h3> 671*5e7646d2SAndroid Build Coastguard Worker 672*5e7646d2SAndroid Build Coastguard Worker<P>CUPS includes a utility called <a href='man-ppdi.html'>ppdi(1)</a> 673*5e7646d2SAndroid Build Coastguard Workerwhich allows you to import existing PPD files into the driver information file 674*5e7646d2SAndroid Build Coastguard Workerformat used by the PPD compiler <a href='man-ppdc.html'>ppdc(1)</a>. Once 675*5e7646d2SAndroid Build Coastguard Workerimported, you can modify, localize, and regenerate the PPD files easily. Type 676*5e7646d2SAndroid Build Coastguard Workerthe following command to import the PPD file <VAR>mydevice.ppd</VAR> into the 677*5e7646d2SAndroid Build Coastguard Workerdriver information file <VAR>mydevice.drv</VAR>:</P> 678*5e7646d2SAndroid Build Coastguard Worker 679*5e7646d2SAndroid Build Coastguard Worker<pre class='command'> 680*5e7646d2SAndroid Build Coastguard Workerppdi -o mydevice.drv mydevice.ppd 681*5e7646d2SAndroid Build Coastguard Worker</pre> 682*5e7646d2SAndroid Build Coastguard Worker 683*5e7646d2SAndroid Build Coastguard Worker<P>If you have a whole directory of PPD files that you would like to import, 684*5e7646d2SAndroid Build Coastguard Workeryou can list multiple filenames or use shell wildcards to import more than one 685*5e7646d2SAndroid Build Coastguard WorkerPPD file on the command-line:</P> 686*5e7646d2SAndroid Build Coastguard Worker 687*5e7646d2SAndroid Build Coastguard Worker<pre class='command'> 688*5e7646d2SAndroid Build Coastguard Workerppdi -o mydevice.drv mydevice1.ppd mydevice2.ppd 689*5e7646d2SAndroid Build Coastguard Workerppdi -o mydevice.drv *.ppd 690*5e7646d2SAndroid Build Coastguard Worker</pre> 691*5e7646d2SAndroid Build Coastguard Worker 692*5e7646d2SAndroid Build Coastguard Worker<P>If the driver information file already exists, the new PPD 693*5e7646d2SAndroid Build Coastguard Workerfile entries are appended to the end of the file. Each PPD file 694*5e7646d2SAndroid Build Coastguard Workeris placed in its own group of curly braces within the driver 695*5e7646d2SAndroid Build Coastguard Workerinformation file.</P> 696*5e7646d2SAndroid Build Coastguard Worker 697*5e7646d2SAndroid Build Coastguard Worker 698*5e7646d2SAndroid Build Coastguard Worker<h2 class='title'><a name='FILTERS'>Using Custom Filters</a></h2> 699*5e7646d2SAndroid Build Coastguard Worker 700*5e7646d2SAndroid Build Coastguard Worker<p>Normally a PostScript printer driver will not utilize any additional print filters. For drivers that provide additional filters such as a CUPS command file filter for doing printer maintenance, you must also list the following <tt>Filter</tt> directive to handle printing PostScript files:</p> 701*5e7646d2SAndroid Build Coastguard Worker 702*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 703*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/vnd.cups-postscript 0 - 704*5e7646d2SAndroid Build Coastguard Worker</pre> 705*5e7646d2SAndroid Build Coastguard Worker 706*5e7646d2SAndroid Build Coastguard Worker<h3>Custom Command Filters</h3> 707*5e7646d2SAndroid Build Coastguard Worker 708*5e7646d2SAndroid Build Coastguard Worker<p>The <tt>application/vnd.cups-command</tt> file type is used for CUPS command files. Use the following <tt>Filter</tt> directive to handle CUPS command files:</p> 709*5e7646d2SAndroid Build Coastguard Worker 710*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 711*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/vnd.cups-command 100 /path/to/command/filter 712*5e7646d2SAndroid Build Coastguard Worker</pre> 713*5e7646d2SAndroid Build Coastguard Worker 714*5e7646d2SAndroid Build Coastguard Worker<p>To use the standard PostScript command filter, specify <var>commandtops</var> as the path to the command filter.</p> 715*5e7646d2SAndroid Build Coastguard Worker 716*5e7646d2SAndroid Build Coastguard Worker<h3>Custom PDF Filters</h3> 717*5e7646d2SAndroid Build Coastguard Worker 718*5e7646d2SAndroid Build Coastguard Worker<p>The <tt>application/pdf</tt> file type is used for unfiltered PDF files while the <tt>application/vnd.cups-pdf</tt> file type is used for filtered PDF files. Use the following <tt>Filter</tt> directive to handle filtered PDF files:</p> 719*5e7646d2SAndroid Build Coastguard Worker 720*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 721*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/vnd.cups-pdf 100 /path/to/pdf/filter 722*5e7646d2SAndroid Build Coastguard Worker</pre> 723*5e7646d2SAndroid Build Coastguard Worker 724*5e7646d2SAndroid Build Coastguard Worker<p>For unfiltered PDF files, use:</p> 725*5e7646d2SAndroid Build Coastguard Worker 726*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 727*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/pdf 100 /path/to/pdf/filter 728*5e7646d2SAndroid Build Coastguard Worker</pre> 729*5e7646d2SAndroid Build Coastguard Worker 730*5e7646d2SAndroid Build Coastguard Worker<p>Custom PDF filters that accept filtered data do not need to perform number-up processing and other types of page imposition, while those that accept unfiltered data MUST do the number-up processing themselves.</p> 731*5e7646d2SAndroid Build Coastguard Worker 732*5e7646d2SAndroid Build Coastguard Worker<h3>Custom PostScript Filters</h3> 733*5e7646d2SAndroid Build Coastguard Worker 734*5e7646d2SAndroid Build Coastguard Worker<p>The <tt>application/vnd.cups-postscript</tt> file type is used for filtered PostScript files. Use the following <tt>Filter</tt> directive to handle PostScript files:</p> 735*5e7646d2SAndroid Build Coastguard Worker 736*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 737*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Filter'>Filter</a> application/vnd.cups-postscript 100 /path/to/postscript/filter 738*5e7646d2SAndroid Build Coastguard Worker</pre> 739*5e7646d2SAndroid Build Coastguard Worker 740*5e7646d2SAndroid Build Coastguard Worker 741*5e7646d2SAndroid Build Coastguard Worker<h2 class='title'><a name='COLOR'>Implementing Color Management</a></h2> 742*5e7646d2SAndroid Build Coastguard Worker 743*5e7646d2SAndroid Build Coastguard Worker<p>CUPS uses ICC color profiles to provide more accurate color reproduction. The <a href='spec-ppd.html#cupsICCProfile'><tt>cupsICCProfile</tt></a> attribute defines the color profiles that are available for a given printer, for example:</p> 744*5e7646d2SAndroid Build Coastguard Worker 745*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 746*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "ColorModel.MediaType.Resolution/Description" /path/to/ICC/profile 747*5e7646d2SAndroid Build Coastguard Worker</pre> 748*5e7646d2SAndroid Build Coastguard Worker 749*5e7646d2SAndroid Build Coastguard Worker<p>where "ColorModel.MediaType.Resolution" defines a selector based on the corresponding option selections. A simple driver might only define profiles for the color models that are supported, for example a printer supporting Gray and RGB might use:</p> 750*5e7646d2SAndroid Build Coastguard Worker 751*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 752*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "Gray../Grayscale Profile" /path/to/ICC/gray-profile 753*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "RGB../Full Color Profile" /path/to/ICC/rgb-profile 754*5e7646d2SAndroid Build Coastguard Worker</pre> 755*5e7646d2SAndroid Build Coastguard Worker 756*5e7646d2SAndroid Build Coastguard Worker<p>The options used for profile selection can be customized using the <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> attributes.</p> 757*5e7646d2SAndroid Build Coastguard Worker 758*5e7646d2SAndroid Build Coastguard Worker 759*5e7646d2SAndroid Build Coastguard Worker<h2 class='title'><a name='MACOSX'>Adding macOS Features</a></h2> 760*5e7646d2SAndroid Build Coastguard Worker 761*5e7646d2SAndroid Build Coastguard Worker<p>macOS printer drivers can provide <a href='spec-ppd.html#MACOSX'>additional attributes</a> to specify additional option panes in the print dialog, an image of the printer, a help book, and option presets for the driver software:</p> 762*5e7646d2SAndroid Build Coastguard Worker 763*5e7646d2SAndroid Build Coastguard Worker<pre class='example'> 764*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDialogExtension "" /Library/Printers/Vendor/filename.plugin 765*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APHelpBook "" /Library/Printers/Vendor/filename.bundle 766*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterIconPath "" /Library/Printers/Vendor/filename.icns 767*5e7646d2SAndroid Build Coastguard Worker<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterPreset "name/text" "*option choice ..." 768*5e7646d2SAndroid Build Coastguard Worker</pre> 769*5e7646d2SAndroid Build Coastguard Worker </div> 770*5e7646d2SAndroid Build Coastguard Worker </body> 771*5e7646d2SAndroid Build Coastguard Worker</html> 772