G
Gast
Gast
Code:
Doc myDoc = new SimpleDoc(new FileInputStream(path),DocFlavor.INPUT_STREAM.PDF,new HashDocAttributeSet());
PrintService Printer=PrintServiceLookup.lookupDefaultPrintService();
DocPrintJob job=Printer.createPrintJob();
PrintRequestAttributeSet aset=new HashPrintRequestAttributeSet();
aset.add(MediaSizeName.ISO_A4);
job.print(myDoc,aset);
bekomme die Exception sun.print.PrintJobFlavorException: invalid flavor
HTML reagiert genauso - GIF, PNG, JPG funktionieren
DocFlavor.INPUT_STREAM.AUTOSENSE liefert nur Hieroglyphen