Search code examples
java.netprintingdevice-driverpostscript

Query a printer to determine the postscript inputslot tray numbers


I'm trying to figure out a way to programmatically determine a printers inputslot tray to number definitions for use in generating postscript.

I have gathered a collection of PPD files and collated information that way but it seems stupid to be limited to only the printers i have the PPD's for - would be better to interrogate the printers installed in windows, cant see it being a problem for unix installs. Would this be possible in Java or .NET?

edit:

I've since found out that postscript level 2 uses the actual tray names instead of the numbers. Since i know its possible to query the printers (or it could just be retrieving the information in windows) in .NET for the tray names i figure when the decision to change this in postscript 3 was made, they must of had a way to get the id's...

Anyone that can point me in the right direction? Google cant seem to help. Or at least i cant find the right search terms


Solution

  • Try with DeviceCapabilities and DC_BINNAMES.