Setting the Number of Copies of a Print Job : Print Job « 2D Graphics GUI « Java

Setting the Number of Copies of a Print Job


import javax.print.attribute.HashPrintRequestAttributeSet;
import javax.print.attribute.PrintRequestAttributeSet;
import javax.print.attribute.standard.Copies;

public class Main {
  public static void main(String[] argv) throws Exception {

    // Set up the attribute set
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(new Copies(2));



Related examples in the same category

1.Cancelling a Print Job
2.Determining Print Job Capabilities Supported by a Print Service
3.Getting the Default Value of a Print Job Capability
4.Getting the Possible Values for a Print Job Capability
5.Setting the Orientation of a Print Job -- Portrait or Landscape
6.Listening for Print Job Status Changes
7.Listening for Print Job Attribute Changes
8.Determining When a Print Job Has Finished
9.How to print 2D graphicsHow to print 2D graphics