private void doPrint(PrintService service, File toPrintFile) throws Exception {
FileInputStream stream = null;
try {
stream = new FileInputStream(toPrintFile);
DocFlavor format = DocFlavor.INPUT_STREAM.AUTOSENSE;
Doc myDoc = new SimpleDoc(stream, format, null);
PrintRequestAttributeSet aset = null;
// new HashPrintRequestAttributeSet();
// aset.add(new Copies(1));
// aset.add(MediaSize.ISO.A4);
// aset.add(Sides.ONE_SIDED);