wood burning stoves 2.0*
The moose likes Java in General and the fly likes Identifying Type of Printer Using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Identifying Type of Printer Using Java" Watch "Identifying Type of Printer Using Java" New topic

Identifying Type of Printer Using Java

vasu devan
Ranch Hand

Joined: Apr 14, 2005
Posts: 38
Dear Friends

Currently i am Using javax.print Package to Print TXT Files
Its Working Fine.

But Whats my Query is

Is There any Possibility to Identify the Type of Printer's im using,for example is the Printer is Laser or dot-matrix or inkjet?

I Tried search engine to find any other possiblity,i didnt get any solution.

Any help will be greatly Appreciated and its Needed Urgently

Thanks in advance

Pradeep Kadambar
Ranch Hand

Joined: Oct 18, 2004
Posts: 148

Java won't provide you that flexibility at h/w level. If you want to detect the printer driver type then you need to use native code to access the APIs.

Check with Java COM bridges.

vasu devan
Ranch Hand

Joined: Apr 14, 2005
Posts: 38
hi Pradeep,

Thanks for the response
Do you have any link for getting info through native methods?

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636

My blood is tested +ve for Java.
Jeff Yung

Joined: Feb 05, 2006
Posts: 2
Call JNI to call C program.

Please check it out:

See the sample code of JMX programming chapter 13.

It will get the following object (if you use level 4):

Hope it may help.
I agree. Here's the link: http://aspose.com/file-tools
subject: Identifying Type of Printer Using Java