Hello
With my java application I am printing with success a file.
Here is the code:
...
DocPrintJob dPJ = services[0].createPrintJob();
fis = new FileInputStream(sFilename);
DocAttributeSet das = new HashDocAttributeSet();
Doc doc = new SimpleDoc(fis, DocFlavor.INPUT_STREAM.AUTOSENSE, das);
// Monitor print job events
PrintJobManagment pjm = new PrintJobManagment(dPJ);
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
pras.add(new JobName(sFile, null));
System.out.println("PRINT");
// Prints the file
dPJ.print(doc, pras);
...
Everything works fine.
However, when the printer is in "Paused" status, the program stops at line "dPJ.print(doc, pras);" and waits until I stop it or until I "unpause" the printer.
How can I indicate a timeout in which after X seconds, the program continues or stop?
Thanks
Regards