This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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
It's not a secret anymore!