Sometimes we need to determine some aspects of the print request. We will call them attribute.
Are examples of print request attributes:
Before choosing one of them and which value each one will have, first we need to build a set of attributes:
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
Now we can add them. Some examples are:
pras.add(new Copies(5));
pras.add(MediaSize.ISO_A4);
pras.add(OrientationRequested.PORTRAIT);
pras.add(PrintQuality.NORMAL);
The pras
object now can be sent to the print job request (see Creating a print job from a print service).