Forums Register Login

Java print Api couldnot find network printer

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
It's weird that we cook bacon and bake cookies. Eat this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2258 times.
Similar Threads
find the network printer print job names
Need to get IP Address
No instance of PrintService is being created
find the network printers status and job names
find the PrinterJobQueue in and jobsnames in queue
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:59:32.