wood burning stoves*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Identifying Type of Printer Using Java" Watch "Identifying Type of Printer Using Java" New topic
Author

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

Regards
Vasu
Pradeep Kadambar
Ranch Hand

Joined: Oct 18, 2004
Posts: 148
Vasu,

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?

Regards
vasu
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Jacob


My blood is tested +ve for Java.
Jeff Yung
Greenhorn

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

Please check it out:
http://as.wiley.com/WileyCDA/WileyAncillary/productCd-076454957X,typeCd-DOWNLOAD.html

See the sample code of JMX programming chapter 13.

It will get the following object (if you use level 4):
PRINTER_INFO_4
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_8vle.asp

Hope it may help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Identifying Type of Printer Using Java
 
Similar Threads
Printing
Open Print Properties Dialog
Printing to a Network Printer
Printing API Question
output to the printer ???