aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes List of Printers in client machine -Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "List of Printers in client machine -Java" Watch "List of Printers in client machine -Java" New topic
Author

List of Printers in client machine -Java

Rayudu addagarla
Ranch Hand

Joined: Aug 17, 2000
Posts: 39
I would like to retrieve the list of printers attached to the clients machine, thru. my java application.
Is there any method in Java API which returns the list of printers attached. If there is any third party tool which supports this, pl. suggest...
Actuall an Applet should be able to do this.
thanks
if some one can mail me at rayuduak@yahoo.com i would appreciate


Good luck for Certfication.
Jeff Yung
Greenhorn

Joined: Feb 05, 2006
Posts: 2
import javax.print.PrintService;

PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);

// Get the printer name
for(int i=0;i<services.length;i++) {
String name = services[0].getName();
System.out.println("printer="+name);
}
 
 
subject: List of Printers in client machine -Java