• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to get the raw printer tray ID

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I’m trying to find the printer tray ids of a particular printer. I have searched and found a lot of articles in Java using the PrintService, Media and MediaTray. Yet, this doesn’t provide a solution for my requirement. I will get the following output if I run the below code.




Win32 Printer : AL-M2010-3D8E02
Form-Source ID: 5 sun.print.Win32MediaTray
MP Tray ID: 6 sun.print.Win32MediaTray
Lower Cassette 1 ID: 7 sun.print.Win32MediaTray
Lower Cassette 2 ID: 8 sun.print.Win32MediaTray
Lower Cassette 3 ID: 9 sun.print.Win32MediaTray
Lower Cassette 4 ID: 10 sun.print.Win32MediaTray

If I run the following .net code I would get the following outpt.



Automatically Select 15
MP Tray 261
Lower Cassette 1 260
Lower Cassette 2 259
Lower Cassette 3 258
Lower Cassette 4 257


The above is what I want to achieve. I want to get the raw printer ID like 260, 259, 258 and so on through Java instade of 7,8,9,10. Is this possible in some way?

Thanks in advance.
Regards,
The CD Man
 
reply
    Bookmark Topic Watch Topic
  • New Topic