my dog learned polymorphism*
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 Murach's Java Servlets and JSP this week in the Servlets 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

Java print Api couldnot find network printer

Jitendra Nayak

Joined: Mar 13, 2006
Posts: 9

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.

Teguh Wanrasagita

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.

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

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

I agree. Here's the link:
subject: Java print Api couldnot find network printer
Similar Threads
find the network printer print job names
find the PrinterJobQueue in and jobsnames in queue
find the network printers status and job names
No instance of PrintService is being created
Need to get IP Address