Currently retrieving the default printer installed on my machine for printing. I want to be able to pick which printer the documents go to. What is the best method of doing this ?
Code:
PrintService[] services =
PrintServiceLookup.lookupPrintServices(psInFormat, null);
System.out.println("Printer Selected " + services[Printerinx]);
//PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
DocFlavor[] docFalvor = services[Printerinx].getSupportedDocFlavors();
for (int i = 0; i < docFalvor.length; i++) {
System.out.println(docFalvor[i].getMimeType());
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…