views:

92

answers:

2

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

A: 

Tje java print system allows interrogating the printers ón the current system and determne such functionality.

Thorbjørn Ravn Andersen
Is there a specific attribute that allows this? would you be able to specify a class / link / some sample code?
AphexMunky
A: 

Try with DeviceCapabilities and DC_BINNAMES.

Oleg
is that a c++ library? quite rusty with c++, guess i'll have to get back into it
AphexMunky
`DeviceCapabilities` is a Windows API (see http://msdn.microsoft.com/en-us/library/dd183552%28VS.85%29.aspx and code example in .NET under http://www.pinvoke.net/default.aspx/Enums/DeviceCapabilities.html?diff=y)
Oleg