jQuery in Action, 2nd edition*
The moose likes Other JSE/JEE APIs and the fly likes Java print Api couldnot find network printer 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 "Java print Api couldnot find network printer" Watch "Java print Api couldnot find network printer" New topic
Author

Java print Api couldnot find network printer

Jitendra Nayak
Greenhorn

Joined: Mar 13, 2006
Posts: 9
Hi

am using the following java api

PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();

the "lookupPrintServices"&"lookupDefaultPrintService" classes couldnot find network printer.

if i connect local priner it is working please help me.



regards
Giri
Teguh Wanrasagita
Greenhorn

Joined: Aug 30, 2004
Posts: 1
All you have to do is just add network printer to your local computer which is java application abide and give some specified printer service name.

Using
PrintService [] matchingServices = PrintServiceLookup.lookupPrintServices(flavor, aset);

matchingServices[0].getName(); by this sample you will get one of available printer service names.

Regards
-Teguh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java print Api couldnot find network printer