I have three printer queues going to the same printer:
a, No settings standard (colour) b, Black and white c, Black and white + Stapled
setup in Windows. When printing to any of a, b or c the results are always the same and that is that no settings set on the queue are used. Jobs sent to queue c comes out in colour and with no staple. Printing via the windows print dialog the results are as expected, stapled and bw. Codesnippet:
printServiceAttributeSet.add(new PrinterName("c", null));
PrintService[] service = null;
try{
service = PrintServiceLookup.lookupPrintServices(null, printServiceAttributeSet);
}catch(Exception e){
e.printStackTrace();
}
DocPrintJob job = service[0].createPrintJob();
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
pras.add(new Copies(1));
job.print(doc, pras);
Found this old question with the same problem but no Java solution.
Whats going wrong in this scenario? I see the documents going via the printer queues a,b,c but they all end up with with no settings as compared to via the standard printing dialog when using the queues.