0

Code working printer install local not working printer share or printer server. Please help, I want get all printer connect. Thanks all.

 import javax.print.*;

class Test {

    public static void main (String [] args)
    {
        PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null);
        System.out.println("Number of print services: " + printServices.length);

        for (PrintService printer : printServices)
            System.out.println("Printer: " + printer.getName()); 
    }
}
user2911607
  • 33
  • 1
  • 5
  • Can Linux itself find the printers? – Stephen C Nov 27 '16 at 10:13
  • Can find the printers install local, but don't can find the printers connect another computer. Please help – user2911607 Nov 28 '16 at 03:48
  • I think that you need to configure your Ubuntu system so that it can find the remote printers. Then Java will be able to see them. But configuring Ubuntu printers is a system admin problem, not a programming problem. Ask on one of the stackexchange sites .... – Stephen C Nov 28 '16 at 04:19

0 Answers0