1
如何顯示設備上安裝的所有打印機Java
?如何獲取java中的打印機列表?
到目前爲止找到我的打印機使用:
PrintUtility.findPrintService(printer); //Selects any printer with the name provided
PrintService[] services = PrintServiceLookup.lookupPrintServices(psInFormat, null);
//System.out.println("Printers avialiable are " + services);
System.out.println("Printer Selected " + services[Printerinx]);
不過,我想在控制檯中顯示,所有打印機。我怎樣才能做到這一點?
假設lookupPrintServices返回所有打印機,顯示數組用戶Arrays.toString(services) – orangegoat 2013-03-07 14:57:08