• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java print Api couldnot find network printer

 
Jitendra Nayak
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic