Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to create a .pdr file

The usual method for creating a printer driver .pdr file involves coding the printer driver specification as a text file, a .pd file, and then compiling this file using the pdrtran tool. See the command line syntax and the .pdr file syntax.

As an example, the EPSON printer driver specification is coded as follows:

! EPSON.PD
! Printer driver file for Epson printers

Resources Resources
    Reset "<27>@<27>T<1><27>6<27>x<1><27>R<0>"
    SetPageSize "<27>C<0>%c"
! <27>l<0> left margin to zero
! <27>N<0> no bottom margin
! <27>+<2> 180 lines per inch
! <27>x<1> letter quality
    PreAmble "<10><27>l<0><27>N<0><27>+<2><27>x<1>"
    PostAmble "<12><27>@"
    BoldOn "<27>E"
    BoldOff "<27>F"
    ItalicOn "<27>4"
    ItalicOff "<27>5"
    UnderlineOn "<27>-<1>"
    UnderlineOff "<27>-<0>"
    StrikethroughOn "<27>(-<03><00><01><02><01>"
    StrikethroughOff "<27>(-<03><00><01><02><00>"
    NewPage "<12><10>"
    IncrementXPos "<27>\%w"
    IncrementYPos "<27>J%c" ! maximum 255/180 of an inch
    CarriageReturn "<13>"
    BitmapStart "<27>*<39>%w"
    BitmapEnd "<13>"
EndResources

Translates Page850ToWindows
    130:44 ! low quotation mark mapped to comma
    131:159
    132:44 ! double low quotation marks mapped to comma
    133:46 ! ellipses mapped to full stop
    134:"<27>R<64><125><27>R<0>"
    135:32 ! Double dagger mapped to space
    136:94 ! mapped to circumflex accent
    137:32    ! per mille sign mapped to space
    138:83    ! S with caron mapped to S.
    139:174    ! single left pointing angle quotation mark mapped to double
    140:32    ! Capital OE ligature mapped to space
        145:39 ! left single quotation mark mapped to apostrophe
    146:39 ! right single quotation mark mapped to apostrophe
    147:34 ! left double quotation mark mapped to quotation mark
    148:34 ! right double quotation mark mapped to quotation mark
    149:250    ! bullet
    150:45 ! en-dash mapped to hyphen-minus
    151:45 ! em-dash mapped to hyphen-minus
    152:246 ! small tilde mapped to tilde
    153:"<27>R<64><126><27>R<0>" ! Trademark symbol
    154:115 ! s with caron mapped to s
    155:175    ! single right pointing angle quotation mark mapped to double
    156:32    ! small oe ligature    mapped to space

    159:89    ! Y with diaeresis mapped to Y
    160:32 ! no-break space mapped to space
    161:173    ! Inverted excl. mark
    162:189    ! cent sign
    163:156    ! Pound sign
    164:"<27>R<5><36><27>R<0>"    ! currency symbol
    165:"<27>R<8><92><27>R<0>"    ! Yen symbol
    166:124    ! Vertical bar
    167:"<27>R<64><64><27>R<0>"    ! Section sign
    168:"<27>R<1><126><27>R<0>"        ! diaeresis
    169:"<27>R<64><123><27>R<0>"    ! Copyright symbol
    170:166    ! Feminine ordinal indicator
    171:174
    172:170
    173:45    ! Soft hyphen mapped to hyphen-minus
    174:"<27>R<64><124><27>R<0>"    ! Registered sign
    175:238    ! Macron
    176:"<27>R<64><91><27>R<0>"
    177:241
    178:253
    179:252    ! Superscript 3
    180:239    ! Acute accent
    181:230    ! Micro sign
    182:"<27>R<64><94><27>R<0>"    ! Pilcrow sign
    183:250    ! Middle dot
    184:247    ! Cedilla
    185:251    ! Superscript 1
    186:167
    187:175
    188:172
    189:171
    190:32    ! Three quarters mapped to space
    191:168
    192:183    ! A grave
    193:181    ! A acute
    194:182    ! A circumflex
    195:199    ! A tilde
    196:142
    197:143
    198:146
    199:128
    200:212    ! E grave
    201:144    
    202:210
    203:211
    204:73    ! I grave mapped to I
    205:214    ! I acute
    206:215    ! I circumflex
    207:216    ! I diaeresis
    208:209    ! ETH mapped to D
    209:165
    210:227    ! O grave
    211:224    ! O acute
    212:226    ! O circumflex
    213:229    ! O tilde
    214:153
    215:158    ! Multiplication sign
    216:"<27>R<9><92><27>R<0>"    ! O with stroke
    217:235    ! U with grave
    218:233    ! U acute
    219:234    ! U circumflex
    220:154    
    221:237    ! Y acute
    222:232    ! Capital thorn
    223:"<27>R<2><126><27>R<0>"    ! small sharp S
    224:133
    225:160
    226:131
    227:198    ! a tilde
    228:132    
    229:134
    230:145
    231:135
    232:138
    233:130
    234:136
    235:137
    236:141
    237:161
    238:140
    239:139
    240:208    ! Small letter eth
    241:164
    242:149
    243:162
    244:147
    245:228    ! o tilde
    246:148
    247:246
    248:"<27>R<9><124><27>R<0>"    ! Small o with stroke
    249:151
    250:163
    251:150
    252:129
    253:236    ! y acute
    254:231    ! small letter thorn
    255:152
  EndTranslates

FontInfo Prop
    MaxNormalCharWidth 21
    Ascent 20
    CodeSection 32:127
    32:15
     33:9 34:15 35:15 36:15 37:18 38:18 39:9 40:12
     41:12 42:15 43:15 44:9 45:15 46:9 47:15 48:15
     49:15 50:15 51:15 52:15 53:15 54:15 55:15 56:15
     57:15 58:9 59:9 60:15 61:15 62:15 63:15 64:18
     65:18 66:18 67:18 68:18 69:18 70:18 71:18 72:18
     73:12 74:15 75:18 76:18 77:21 78:18 79:18 80:18
     81:18 82:18 83:18 84:18 85:21 86:18 87:21 88:18
     89:18 90:15 91:12 92:15 93:12 94:15 95:15 96:9
     97:15 98:18 99:15 100:18 101:15 102:12 103:18 104:18
    105:9 106:12 107:18 108:9 109:21 110:18 111:15 112:18
    113:18 114:15 115:15 116:12 117:18 118:18 119:21 120:15
    121:18 122:15 123:12 124:9 125:12 126:15 127:18
    EndCodeSection
    CodeSection 130:140
    130:9 131:15 132:9 133:9 134:18 135:15 136:15
    137:15 138:18 139:15 140:15
    EndCodeSection
    CodeSection 145:156
    145:9 146:9 147:15 148:15 149:15 150:15 151:15
    152:15 153:18 154:15 155:15 156:15
    EndCodeSection
    CodeSection 159:255
    159:18 160:15 161:15 162:15 163:15 164:15 165:18
    166:9 167:15 168:15 169:18 170:15 171:15 172:15
    173:15 174:18 175:15 176:15 177:15 178:15 179:15
    180:9 181:15 182:15 183:15 184:15 185:15 186:15
    187:15 188:15 189:15 190:15 191:15
    192:18 193:18 194:18 195:18 196:18 197:18 198:21
    199:18 200:18 201:18 202:18 203:69 204:12 205:12
    206:12 207:12    208:18 209:18 210:18 211:18 212:18
    213:18 214:18 215:15 216:15 217:21 218:21 219:21
    220:21 221:18 222:18 223:18 224:15 225:15 226:15
    227:15 228:15 229:15 230:21 231:15 232:15 233:15
    234:15 235:15 236:9 237:9 238:9 239:9 240:18
    241:18 242:15 243:15 244:15 245:15 246:15 247:15
    248:15 249:18 250:18 251:18 252:18 253:18 254:18 255:18
    EndCodeSection
EndFontInfo

FontInfo DoubleProp
    MaxNormalCharWidth 42
    Ascent 40
    CodeSection 32:127
    32:30
     33:18 34:30 35:30 36:30 37:36 38:36 39:18 40:24
     41:24 42:30 43:30 44:18 45:30 46:18 47:30 48:30
     49:30 50:30 51:30 52:30 53:30 54:30 55:30 56:30
     57:30 58:18 59:18 60:30 61:30 62:30 63:30 64:36
     65:36 66:36 67:36 68:36 69:36 70:36 71:36 72:36
     73:24 74:30 75:36 76:36 77:42 78:36 79:36 80:36
     81:36 82:36 83:36 84:36 85:42 86:36 87:42 88:36
     89:36 90:30 91:24 92:30 93:24 94:30 95:30 96:18
     97:30 98:36 99:30 100:36 101:30 102:24 103:36 104:36
    105:18 106:24 107:36 108:18 109:42 110:36 111:30 112:36
    113:36 114:30 115:30 116:24 117:36 118:36 119:42 120:30
    121:36 122:30 123:24 124:18 125:24 126:30 127:36
    EndCodeSection
    CodeSection 130:140
    130:18 131:30 132:18 133:18 134:36 135:30 136:30
    137:30 138:36 139:30 140:30
    EndCodeSection
    CodeSection 145:156
    145:18 146:18 147:30 148:30 149:30 150:30 151:30
    152:30 153:36 154:30 155:30 156:30
    EndCodeSection
    CodeSection 159:255
    159:36 160:30 161:30 162:30 163:30 164:30 165:36
    166:18 167:30 168:30 169:36 170:30 171:30 172:30
    173:30 174:36 175:30 176:30 177:30 178:30 179:30
    180:18 181:30 182:30 183:30 184:30 185:30 186:30
    187:30 188:30 189:30 190:30 191:30
    192:36 193:36 194:36 195:36 196:36 197:36 198:42
    199:36 200:36 201:36 202:36 203:69 204:24 205:24
    206:24 207:24    208:36 209:36 210:36 211:36 212:36
    213:36 214:36 215:30 216:30 217:42 218:42 219:42
    220:42 221:36 222:36 223:36 224:30 225:30 226:30
    227:30 228:30 229:30 230:42 231:30 232:30 233:30
    234:30 235:30 236:18 237:18 238:18 239:18 240:36
    241:36 242:30 243:30 244:30 245:30 246:30 247:30
    248:30 249:36 250:36 251:36 252:36 253:36 254:36 255:36
    EndCodeSection
EndFontInfo

FontInfo CourierC10
    MaxNormalCharWidth 12
    Ascent 20
    CodeSection 0:255
      0:12
    EndCodeSection
EndFontInfo

FontInfo Courier10
    MaxNormalCharWidth 15
    Ascent 20
    CodeSection 0:255
      0:15
    EndCodeSection
EndFontInfo

FontInfo CourierE10
    MaxNormalCharWidth 18
    Ascent 20
    CodeSection 0:255
      0:18
    EndCodeSection
EndFontInfo

FontInfo CourierC20
    MaxNormalCharWidth 24
    Ascent 40
    CodeSection 0:255
      0:24
    EndCodeSection
EndFontInfo

FontInfo Courier20
    MaxNormalCharWidth 30
    Ascent 40
    CodeSection 0:255
      0:30
    EndCodeSection
EndFontInfo

FontInfo CourierE20
    MaxNormalCharWidth 36
    Ascent 40
    CodeSection 0:255
      0:36
    EndCodeSection
EndFontInfo

TypefaceFonts Elite
     Name "Elite" Serif
   Translates Page850ToWindows
    FontHeight
        Height 210 ! 10 point
        Normal Prop
        Bold Prop
        Italic Prop
        BoldItalic Prop
        Command "<27>k<2><27>w<0><27>W<0><27>p<1>"
    EndFontHeight
    FontHeight
        Height 420 ! 21 point
        Normal DoubleProp
        Bold DoubleProp
        Italic DoubleProp
        BoldItalic DoubleProp
        Command "<27>k<2><27>w<1><27>W<1><27>p<1>"
    EndFontHeight
EndTypefaceFonts

TypefaceFonts Roman
    Name "Roman" Proportional Serif
    Translates Page850ToWindows
    FontHeight
        Height 210
        Normal Prop
        Bold Prop
        Italic Prop
        BoldItalic Prop
        Command "<27>k<0><27>w<0><27>W<0><27>p<1>"
    EndFontHeight
    FontHeight
        Height 420
        Normal DoubleProp
        Bold DoubleProp
        Italic DoubleProp
        BoldItalic DoubleProp
        Command "<27>k<0><27>w<1><27>W<1><27>p<1>"
    EndFontHeight
EndTypefaceFonts

TypefaceFonts SansSerif
    Name "Sans Serif" Proportional
    Translates Page850ToWindows
    FontHeight
        Height 210
        Normal Prop
        Bold Prop
        Italic Prop
        BoldItalic Prop
        ! sans serif single-width, single height
        Command "<27>k<1><27>w<0><27>W<0><27>p<1>"
    EndFontHeight
    FontHeight
        Height 420
        Normal DoubleProp
        Bold DoubleProp
        Italic DoubleProp
        BoldItalic DoubleProp
        ! sans serif double-width, double height
        Command "<27>k<1><27>w<1><27>W<1><27>p<1>"
    EndFontHeight
EndTypefaceFonts

TypefaceFonts Courier
    Name "Courier" Serif
    Translates Page850ToWindows
    FontHeight
        Height        200    ! 12cpi
        Normal Courier10
        Bold Courier10
        Italic Courier10
        BoldItalic Courier10
        Command "<27>k<2><27>p<0><27><77><18><27>w<0><27>W<0>"
    EndFontHeight
    FontHeight
        Height        400    ! 6cpi
        Normal Courier20
        Bold Courier20
        Italic Courier20
        BoldItalic Courier20
        Command "<27>k<2><27>p<0><27><77><18><27>w<1><27>W<1>"
    EndFontHeight
EndTypefaceFonts

TypefaceFonts CourierCompressed
    Name "Courier (compressed)" Serif
    Translates Page850ToWindows
    FontHeight
        Height        200    ! 15cpi
        Normal CourierC10
        Bold CourierC10
        Italic CourierC10
        BoldItalic CourierC10
        Command "<27>k<2><27>p<0><27><103><18><27>w<0><27>W<0>"
    EndFontHeight
    FontHeight
        Height        400    ! 8cpi
        Normal CourierC20
        Bold CourierC20
        Italic CourierC20
        BoldItalic CourierC20
        Command "<27>k<2><27>p<0><27><103><18><27>w<1><27>W<1>"
    EndFontHeight
EndTypefaceFonts

TypefaceFonts CourierExpanded
    Name "Courier (expanded)" Serif
    Translates Page850ToWindows
    FontHeight
        Height        200    ! 10cpi
        Normal CourierE10
        Bold CourierE10
        Italic CourierE10
        BoldItalic CourierE10
        Command "<27>k<2><27>p<0><27><80><18><27>w<0><27>W<0>"
    EndFontHeight
    FontHeight
        Height        400    ! 5cpi
        Normal CourierE20
        Bold CourierE20
        Italic CourierE20
        BoldItalic CourierE20
        Command "<27>k<2><27>p<0><27><80><18><27>w<1><27>W<1>"
    EndFontHeight
EndTypefaceFonts

Model EpsonLQ860
    Name "Epson LQ-860" RequiresPrinterPort
    Uid 268435817
    Flags 1
! 1 Landscape not available
    Resources Resources
    KPixelWidth 8000 ! Twips = 180 dots per inch
    KPixelHeight 8000
    PortraitOffset 22 90 ! Pixels
    LandscapeOffset 22 90
    MinMarginLeft 22 ! Pixels
    MinMarginRight 22
    MinMarginTop 90
    MinMarginBottom 90
    DisplayMode Gray2
    TypefaceFontss
        Courier
    CourierCompressed
    CourierExpanded
        Elite
        Roman
    SansSerif
    EndTypefaceFontss
EndModel

Model CitizenPN60
    Name "Citizen PN60" RequiresPrinterPort
    Uid -1610611287
    Flags 1
! 1 Landscape not available
    Resources Resources
    KPixelWidth 8000 ! Twips = 180 dots per inch
    KPixelHeight 8000
    PortraitOffset 22 90 ! Pixels
    LandscapeOffset 22 90
    MinMarginLeft 22 ! Pixels
    MinMarginRight 22
    MinMarginTop 90
    MinMarginBottom 90
    DisplayMode Gray2
    TypefaceFontss
        Courier
    CourierCompressed
    CourierExpanded
        Elite
        Roman
    SansSerif
    EndTypefaceFontss
EndModel

Model CanonBubblejetLQ
    Name "Canon Bubblejet (LQ mode)" RequiresPrinterPort
    Uid 268439229
    Flags 1
! Landscape not available
    Resources Resources
    KPixelWidth 8000 ! Twips = 180 dots per inch
    KPixelHeight 8000
    PortraitOffset 23 90 ! Pixels
    LandscapeOffset 23 90
    MinMarginLeft 23 ! Pixels
    MinMarginRight 23
    MinMarginTop 90
    MinMarginBottom 90
    DisplayMode Gray2
    TypefaceFontss
        Courier
    CourierCompressed
    CourierExpanded
    Elite
    Roman
    SansSerif
    EndTypefaceFontss
EndModel

PdrStoreFile
    PDLName "Epson"
    PDLUid 268435820
    Models
    CanonBubblejetLQ
    CitizenPN60
        EpsonLQ860
    EndModels
EndPdrStoreFile