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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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
 
 
subject: Java print Api couldnot find network printer