Dmitry Timoshkov wrote:
Since we have a fairly limited set of available DMBIN_???, some approximation
could be used. For all missing bins we could just assign some reasonable value,
for instance DMBIN_AUTO:
I wrote a little test program to see what Windows reports for these
different bin types, and the results are interesting. On Windows NT 4,
both the Microsoft and Adobe PostScript drivers seem to just map every-
thing to DMBIN_USER+x values! For example, I installed the "IBM 4019
LaserPrinter PS17" driver (PPD file attached), and got the following
from DeviceCapabilities:
DC_BINNAMES DC_BINS
Automatically Select DMBIN_FORMSOURCE
Upper 256
Lower 257
Envelope 258
EnvelopeManual 259
Manual Feed DMBIN_MANUAL
(Note that every printer driver I tried had the "Automatically Select"
and "Manual Feed" entries.)
Based on this, I see no reason to try to guess what the appropriate
DMBIN* type is for undocumented *InputSlot values. In my mind, the
question is whether we should use the mappings in Adobe's PPD spec or
completely emulate the Windows behavior.
Thoughts?
--
========================================================================
Ian Pilcher ian.pilcher@home.com
========================================================================
*PPD-Adobe: "4.2"
*% Adobe Systems PostScript(R) Printer Description File
*% For IBM LaserPrinter 4019
*% For use with Windows NT Ver 4.x
*% Produced by Lexmark International, Inc.
*%
*% Copyright (c) 1993 Lexmark International Inc. All Rights Reserved.
*% Permission is granted for redistribution of this file as
*% long as this copyright notice is intact and the content
*% of the file is not altered in any way from its original form.
*%
*%
*% Version History:
*% 3.1) Changed for NT Ver 4.0
*%
*FormatVersion: "4.2"
*FileVersion: "3.1"
*LanguageVersion: English
*PCFileName: "IBM17523.PPD"
*Product: "(IBM LaserPrinter)"
*PSVersion: "(52.1) 0"
*PSVersion: "(52.3) 0"
*ModelName: "IBM 4019 LaserPrinter PS17"
*ShortNickName: "IBM 4019 LaserPrinter PS17"
*NickName: "IBM 4019 LaserPrinter PS17"
*% === Options and Constraints ============
*OpenGroup: InstallableOptions/Options Installed
*OpenUI *Option1/Optional Lower Tray: Boolean
*DefaultOption1: False
*Option1 True/Installed: ""
*Option1 False/Not Installed: ""
*CloseUI: *Option1
*OpenUI *Option2/Optional Envelope Feeder: Boolean
*DefaultOption2: False
*Option2 True/Installed: ""
*Option2 False/Not Installed: ""
*CloseUI: *Option2
*OpenUI *Option3/Memory Configuration: PickOne
*DefaultOption3: None
*Option3 None/Installed Memory 1.5 MB: ""
*Option3 2Meg/Installed Memory 2.5 MB: ""
*Option3 3.5Meg/Installed Memory 4 MB: ""
*CloseUI: *Option3
*CloseGroup: InstallableOptions
*UIConstraints: *Option1 False *InputSlot Lower
*UIConstraints: *Option1 False *TraySwitch
*UIConstraints: *Option2 False *InputSlot Envelope
*UIConstraints: *Option3 None *PageSize Legal
*UIConstraints: *Option3 None *PageRegion Legal
*% === Basic Capabilities ============
*LanguageLevel: "1"
*FreeVM: "132000"
*ColorDevice: False
*DefaultColorSpace: Gray
*VariablePaperSize: False
*FileSystem: False
*Throughput: "10"
*Password: "0"
*ExitServer: "
count 0 eq % is the password on the stack?
{ true }
{ dup % potential password
statusdict /checkpassword get exec not
} ifelse
{ % if no password or not valid
(WARNING : Cannot perform the exitserver command.) =
(Password supplied is not valid.) =
(Please contact the author of this software.) = flush
quit
} if
serverdict /exitserver get exec
"
*End
*Reset: "
count 0 eq % is the password on the stack?
{ true }
{ dup % potential password
statusdict /checkpassword get exec not
} ifelse
{ % if no password or not valid
(WARNING : Cannot reset printer.) =
(Password supplied is not valid.) =
(Please contact the author of this software.) = flush
quit
} if
serverdict /exitserver get exec
systemdict /quit get exec
(WARNING : Printer Reset Failed.) = flush
"
*End
*% === Resolution ============
*DefaultResolution: 300dpi
*Resolution 300dpi: ""
*?Resolution: "
save initgraphics
0 0 moveto currentpoint matrix defaultmatrix transform
0 72 lineto currentpoint matrix defaultmatrix transform
3 -1 roll sub dup mul
3 1 roll exch sub dup mul
add sqrt round cvi ( ) cvs print (dpi) = flush
restore
"
*End
*% === Halftone Information ===============
*ScreenFreq: "60.0"
*ScreenAngle: "45.0"
*DefaultScreenProc: Dot
*ScreenProc Dot: "
{abs exch abs 2 copy add 1 gt {1 sub dup mul exch 1 sub dup mul add 1
sub }{dup mul exch dup mul add 1 exch sub }ifelse }
"
*End
*ScreenProc Line: "{ pop }"
*ScreenProc Ellipse: "{ dup 5 mul 8 div mul exch dup mul exch add sqrt 1 exch sub }"
*DefaultTransfer: Null
*Transfer Null: "{ }"
*Transfer Null.Inverse: "{ 1 exch sub }"
*% === Paper Handling ===================
*% Code in this section selects a tray and sets up a frame buffer.
*OpenUI *PageSize: PickOne
*OrderDependency: 30 AnySetup *PageSize
*DefaultPageSize: Letter
*PageSize Letter: "statusdict begin {lettertray}stopped {3 setpapertray letter}if end"
*PageSize Legal: "statusdict begin {legaltray}stopped {3 setpapertray legal}if end"
*PageSize Executive: "
statusdict begin {executivetray}stopped {3 setpapertray executivepage}if end"
*End
*PageSize A4: "statusdict begin {a4tray}stopped {3 setpapertray a4}if end"
*PageSize A5: "statusdict begin {a5tray}stopped {3 setpapertray a5}if end"
*PageSize B5: "statusdict begin {b5tray}stopped {3 setpapertray b5}if end"
*PageSize Monarch/Envelope Monarch: "
statusdict begin {3.875x7.5envelopetray}stopped
{4 setpapertray 3.875x7.5envelope}if end
279 540 translate 180 rotate"
*End
*PageSize C9/Envelope #9: "
statusdict begin {3.875x8.875envelopetray}stopped
{4 setpapertray 3.875x8.875envelope}if end
279 639 translate 180 rotate"
*End
*PageSize Comm10/Envelope #10: "
statusdict begin {4.125x9.5envelopetray}stopped
{4 setpapertray 4.125x9.5envelope}if end
297 684 translate 180 rotate"
*End
*PageSize DL/Envelope DL: "
statusdict begin {110x220envelopetray}stopped
{4 setpapertray 110x220envelope}if end
312 624 translate 180 rotate"
*End
*PageSize C5/Envelope C5: "
statusdict begin {162x229envelopetray}stopped
{4 setpapertray 162x229envelope}if end
459 649 translate 180 rotate"
*End
*PageSize ISOB5/Envelope B5: "
statusdict begin {176x250envelopetray}stopped
{4 setpapertray 176x250envelope}if end
499 709 translate 180 rotate"
*End
*?PageSize: "
save
12 dict
dup /letter (Letter) put
dup /legal (Legal) put
dup /executivepage (Executive) put
dup /a4 (A4) put
dup /a5 (A5) put
dup /b5 (B5) put
dup /3.875x7.5envelope (Monarch) put
dup /3.875x8.875envelope (Envelope.279.639) put
dup /4.125x9.5envelope (Comm10) put
dup /110x220envelope (DL) put
dup /162x229envelope (C5) put
dup /176x250envelope (Envelope.499.709) put
statusdict /papersize get exec
3 1 roll {get} stopped {(Unknown)}if
exch not { print (.Transverse) }if
= flush
restore
"
*End
*CloseUI: *PageSize
*% These entries will set up the frame buffer. Usually used with manual feed.
*OpenUI *PageRegion: PickOne
*OrderDependency: 40 AnySetup *PageRegion
*DefaultPageRegion: Letter
*PageRegion Letter: "letter"
*PageRegion Legal: "legal"
*PageRegion Executive: "executivepage"
*PageRegion A4: "a4"
*PageRegion A5: "a5"
*PageRegion B5: "b5"
*PageRegion Monarch/Envelope Monarch: "3.875x7.5envelope 279 540 translate 180 rotate"
*PageRegion C9/Envelope #9: "3.875x8.875envelope 279 639 translate 180 rotate"
*PageRegion Comm10/Envelope #10: "4.125x9.5envelope 297 684 translate 180 rotate"
*PageRegion DL/Envelope DL: "110x220envelope 312 624 translate 180 rotate"
*PageRegion C5/Envelope C5: "162x229envelope 459 649 translate 180 rotate"
*PageRegion ISOB5/B5 Envelope: "176x250envelope 499 709 translate 180 rotate"
*CloseUI: *PageRegion
*DefaultImageableArea: Letter
*ImageableArea Letter: "18 17 597 776"
*ImageableArea Legal: "18 18 597 992"
*ImageableArea Executive: "18 18 505 740"
*ImageableArea A4: "18 19 578 827"
*ImageableArea A5: "18 13 405 580"
*ImageableArea B5: "18 18 505 711"
*ImageableArea Monarch: "1 13 260 526"
*ImageableArea C9: "1 16 260 623"
*ImageableArea Comm10: "3 16 278 668"
*ImageableArea DL: "3 16 293 608"
*ImageableArea C5: "4 16 440 634"
*ImageableArea ISOB5: "2 15 480 693"
*?ImageableArea: "
save
/cvp { ( ) cvs print ( ) print } bind def
/upperright {10000 mul floor 10000 div} bind def
/lowerleft {10000 mul ceiling 10000 div} bind def
newpath clippath pathbbox
4 -2 roll exch 2 {lowerleft cvp} repeat
exch 2 {upperright cvp} repeat flush
restore
"
*End
*% These provide the physical dimensions of the paper (by keyword)
*DefaultPaperDimension: Letter
*PaperDimension Letter: "612 792"
*PaperDimension Legal: "612 1008"
*PaperDimension Executive: "522 756"
*PaperDimension A4: "595 842"
*PaperDimension A5: "420 595"
*PaperDimension B5: "516 729"
*PaperDimension Monarch: "279 540"
*PaperDimension C9: "279 639"
*PaperDimension Comm10: "297 684"
*PaperDimension DL: "312 624"
*PaperDimension C5: "459 649"
*PaperDimension ISOB5: "499 709"
*RequiresPageRegion All: True
*OpenUI *InputSlot: PickOne
*OrderDependency: 20 AnySetup *InputSlot
*DefaultInputSlot: Unknown
*InputSlot Upper: "0 statusdict /setpapertray get exec"
*InputSlot Lower: "
statusdict begin optionalfeeder { 1 }{ 0 }ifelse setpapertray end"
*End
*InputSlot Envelope: "
statusdict begin envelopefeeder { 2 }{ 3 }ifelse setpapertray end"
*End
*InputSlot EnvelopeManual: "4 statusdict /setpapertray get exec"
*?InputSlot: "
save
[ (Upper) (Lower) (Envelope) (Manual) (ManualEnvelope) ] statusdict /papertray get exec
{get exec} stopped { pop pop (Unknown) } if = flush
restore
"
*End
*CloseUI: *InputSlot
*OpenUI *ManualFeed: Boolean
*OrderDependency: 15 AnySetup *ManualFeed
*DefaultManualFeed: False
*ManualFeed True: "3 statusdict /setpapertray get exec"
*ManualFeed False: "statusdict /manualfeed false put"
*?ManualFeed: "
save
statusdict /manualfeed get {(True)}{(False)}ifelse = flush
restore
"
*End
*CloseUI: *ManualFeed
*OpenUI *TraySwitch/Tray Linking: PickOne
*OrderDependency: 50 AnySetup *TraySwitch
*DefaultTraySwitch: None
*TraySwitch None/Printer Setting: ""
*TraySwitch True/On: "statusdict /trayswitch true put"
*TraySwitch False/Off: "statusdict /trayswitch false put"
*?TraySwitch: "
save
statusdict /trayswitch get {(True)}{(False)}ifelse = flush
restore
"
*End
*CloseUI: *TraySwitch
*DefaultOutputOrder: Normal
*OutputOrder Normal: ""
*OutputOrder Reverse: ""
*% === Font Information =====================
*DefaultFont: Courier
*Font Courier: Standard "(001.004)" Standard ROM
*Font Courier-Bold: Standard "(001.004)" Standard ROM
*Font Courier-BoldOblique: Standard "(001.004)" Standard ROM
*Font Courier-Oblique: Standard "(001.004)" Standard ROM
*Font Helvetica: Standard "(001.002)" Standard ROM
*Font Helvetica-Bold: Standard "(001.002)" Standard ROM
*Font Helvetica-BoldOblique: Standard "(001.002)" Standard ROM
*Font Helvetica-Narrow: Standard "(001.002)" Standard ROM
*Font Helvetica-Narrow-Bold: Standard "(001.002)" Standard ROM
*Font Helvetica-Narrow-BoldOblique: Standard "(001.002)" Standard ROM
*Font Helvetica-Narrow-Oblique: Standard "(001.002)" Standard ROM
*Font Helvetica-Oblique: Standard "(001.002)" Standard ROM
*Font Symbol: Special "(001.003)" Special ROM
*Font Times-Bold: Standard "(001.002)" Standard ROM
*Font Times-BoldItalic: Standard "(001.004)" Standard ROM
*Font Times-Italic: Standard "(001.002)" Standard ROM
*Font Times-Roman: Standard "(001.002)" Standard ROM
*?FontQuery: "
save
/str 100 string dup 0 (fonts/) putinterval def
{ count 1 gt
{ exch dup str 6 94 getinterval cvs
(/) print print (:) print
FontDirectory exch known
{(Yes)}{(No)} ifelse =
}
{exit} ifelse
}bind loop
(*) = flush
restore
"
*End
*?FontList: "save FontDirectory { pop == } bind forall flush (*) = flush restore"
*% Printer Messages (verbatim from printer):
*Message: "%% exitserver: permanent state may be changed %%"
*Message: "%% Flushing: rest of job (to end-of-file) will be ignored %%"
*Message: "FontName\ not found, using Courier"
*% Status (format: %% status: <one of these> %% )
*Status: "Printer Busy"
*Status: "Warming Up"
*Status: "PrinterError: Printer Offline"
*Status: "PrinterError: Paper Out or Feed Failure - Tray 1"
*Status: "PrinterError: Paper Out or Feed Failure - Tray 2"
*Status: "PrinterError: Paper Out or Feed Failure - Envelope Feeder"
*Status: "PrinterError: Load Paper Requested"
*Status: "PrinterError: Load Envelope Requested"
*Status: "PrinterError: Invalid Manual Insertion"
*Status: "PrinterError: Wrong Paper Length"
*Status: "PrinterError: Paper Jam"
*Status: "PrinterError: Cover Open/Cartridge Not Installed"
*Status: "PrinterError: Output Bin Full"
*Status: "PrinterError: Default Storage Error"
*Status: "PrinterError: Battery Low - Slot 1"
*Status: "PrinterError: Battery Low - Slot 2"
*Status: "PrinterError: Non-Download Font Card Installed - Slot 1"
*Status: "PrinterError: Non-Download Font Card Installed - Slot 2"
*Status: "PrinterError: Write-Protect Switch in Protect Position - Slot 1"
*Status: "PrinterError: Write-Protect Switch in Protect Position - Slot 2"
*Status: "PrinterError: Defective or Unprogrammed Card Installed - Slot 1"
*Status: "PrinterError: Defective or Unprogrammed Card Installed - Slot 2"
*Status: "PrinterError: Defective Font Card Installed - Slot 1"
*Status: "PrinterError: Defective Font Card Installed - Slot 2"
*Status: "PrinterError: Unsupported Card Installed - Slot 1"
*Status: "PrinterError: Unsupported Card Installed - Slot 2"
*Status: "PrinterError: Printer Busy"
*Status: "PrinterError: Printer Error"
*% Input Sources (format: %% status: <stat>; source: <one of these> %% )
*Source: "serial9"
*Source: "serial25"
*Source: "Centronics"
*% Printer Error (format: %% PrinterError: <one of these> %%)
*PrinterError: "Printer Offline"
*PrinterError: "Paper Out or Feed Failure - Tray 1"
*PrinterError: "Paper Out or Feed Failure - Tray 2"
*PrinterError: "Paper Out or Feed Failure - Envelope Feeder"
*PrinterError: "Load Paper Requested"
*PrinterError: "Load Envelope Requested"
*PrinterError: "Invalid Manual Insertion"
*PrinterError: "Wrong Paper Length"
*PrinterError: "Paper Jam"
*PrinterError: "Cover Open/Cartridge Not Installed"
*PrinterError: "Output Bin Full"
*PrinterError: "Default Storage Error"
*PrinterError: "Battery Low - Slot 1"
*PrinterError: "Battery Low - Slot 2"
*PrinterError: "Non-Download Font Card Installed - Slot 1"
*PrinterError: "Non-Download Font Card Installed - Slot 2"
*PrinterError: "Write-Protect Switch in Protect Position - Slot 1"
*PrinterError: "Write-Protect Switch in Protect Position - Slot 2"
*PrinterError: "Defective or Unprogrammed Card Installed - Slot 1"
*PrinterError: "Defective or Unprogrammed Card Installed - Slot 2"
*PrinterError: "Defective Font Card Installed - Slot 1"
*PrinterError: "Defective Font Card Installed - Slot 2"
*PrinterError: "Unsupported Card Installed - Slot 1"
*PrinterError: "Unsupported Card Installed - Slot 2"
*PrinterError: "Printer Busy"
*PrinterError: "Printer Error"
*%DeviceAdjustMatrix: "[1 0 0 1 0 0]"
*% === Color Separation Information =====================
*DefaultColorSep: ProcessBlack.60lpi.300dpi/60 lpi / 300 dpi
*InkName: ProcessBlack/Process Black
*InkName: CustomColor/Custom Color
*InkName: ProcessCyan/Process Cyan
*InkName: ProcessMagenta/Process Magenta
*InkName: ProcessYellow/Process Yellow
*% For 60 lpi / 300 dpi ===============================
*ColorSepScreenAngle ProcessBlack.60lpi.300dpi/60 lpi / 300 dpi: "45"
*ColorSepScreenAngle CustomColor.60lpi.300dpi/60 lpi / 300 dpi: "45"
*ColorSepScreenAngle ProcessCyan.60lpi.300dpi/60 lpi / 300 dpi: "15"
*ColorSepScreenAngle ProcessMagenta.60lpi.300dpi/60 lpi / 300 dpi: "75"
*ColorSepScreenAngle ProcessYellow.60lpi.300dpi/60 lpi / 300 dpi: "0"
*ColorSepScreenFreq ProcessBlack.60lpi.300dpi/60 lpi / 300 dpi: "60"
*ColorSepScreenFreq CustomColor.60lpi.300dpi/60 lpi / 300 dpi: "60"
*ColorSepScreenFreq ProcessCyan.60lpi.300dpi/60 lpi / 300 dpi: "60"
*ColorSepScreenFreq ProcessMagenta.60lpi.300dpi/60 lpi / 300 dpi: "60"
*ColorSepScreenFreq ProcessYellow.60lpi.300dpi/60 lpi / 300 dpi: "60"
*% For 53 lpi / 300 dpi ===============================
*ColorSepScreenAngle ProcessBlack.53lpi.300dpi/53 lpi / 300 dpi: "45.0"
*ColorSepScreenAngle CustomColor.53lpi.300dpi/53 lpi / 300 dpi: "45.0"
*ColorSepScreenAngle ProcessCyan.53lpi.300dpi/53 lpi / 300 dpi: "71.5651"
*ColorSepScreenAngle ProcessMagenta.53lpi.300dpi/53 lpi / 300 dpi: "18.4349"
*ColorSepScreenAngle ProcessYellow.53lpi.300dpi/53 lpi / 300 dpi: "0.0"
*ColorSepScreenFreq ProcessBlack.53lpi.300dpi/53 lpi / 300 dpi: "53.033"
*ColorSepScreenFreq CustomColor.53lpi.300dpi/53 lpi / 300 dpi: "53.033"
*ColorSepScreenFreq ProcessCyan.53lpi.300dpi/53 lpi / 300 dpi: "47.4342"
*ColorSepScreenFreq ProcessMagenta.53lpi.300dpi/53 lpi / 300 dpi: "47.4342"
*ColorSepScreenFreq ProcessYellow.53lpi.300dpi/53 lpi / 300 dpi: "50.0"
*% End of PPD file for IBM LaserPrinter 4019