![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e711. Setting the Number of Copies of a Print JobPrint job attributes are delivered to the print service via the print request attribute set supplied toDocPrintJob.print() . See
e700 The Quintessential Printing Program Using a Printing Service to see how to set up a print job.
try { // Set up the attribute set PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet(); aset.add(new Copies(2)); // Print it job.print(doc, aset); } catch (PrintException e) { }
e712. Printing to a File © 2002 Addison-Wesley. |