jdk/src/java.desktop/share/classes/javax/print/package.html
changeset 39014 bb1c478f025b
parent 25859 3317bb8137f4
equal deleted inserted replaced
39013:d6a023d500ef 39014:bb1c478f025b
   120 DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
   120 DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
   121 Doc myDoc = new SimpleDoc(psStream, psInFormat, null);  
   121 Doc myDoc = new SimpleDoc(psStream, psInFormat, null);  
   122 PrintRequestAttributeSet aset = 
   122 PrintRequestAttributeSet aset = 
   123 	new HashPrintRequestAttributeSet();
   123 	new HashPrintRequestAttributeSet();
   124 aset.add(new Copies(5));
   124 aset.add(new Copies(5));
   125 aset.add(MediaSize.A4);
   125 aset.add(MediaSizeName.ISO_A4);
   126 aset.add(Sides.DUPLEX);
   126 aset.add(Sides.DUPLEX);
   127 PrintService[] services = 
   127 PrintService[] services = 
   128   PrintServiceLookup.lookupPrintServices(psInFormat, aset);
   128   PrintServiceLookup.lookupPrintServices(psInFormat, aset);
   129 if (services.length > 0) {
   129 if (services.length > 0) {
   130    DocPrintJob job = services[0].createPrintJob();
   130    DocPrintJob job = services[0].createPrintJob();