javax.print.PrintException: Job could not be cancelled.

Oracle Community | 843797 | 1 decade ago
  1. 0

    Problem for cancelling jobs

    Oracle Community | 1 decade ago | 843797
    javax.print.PrintException: Job could not be cancelled.
  2. 0

    Printing documents from WebSphere

    Google Groups | 10 years ago | jason.m...@marsh.com
    javax.print.PrintException: Print job failed to start.
  3. 0

    Why won't it print?

    Oracle Community | 1 decade ago | 807598
    javax.print.PrintException: Printer is not accepting job.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    javax.print.PrintException: already printing

    Stack Overflow | 2 years ago
    javax.print.PrintException: already printing exception, even though the printer is not printing. try{ fis = new FileInputStream(imgFile1);} catch(IOException ex{System.out.println(ex);} DocFlavor fl = DocFlavor.INPUT_STREAM.JPEG; Doc doc1 = new SimpleDoc(fis,fl,null); DocPrintJob job = selection.createPrintJob(); for(int i=0;i<Integer.valueOf(iterationTextField.getText());i++){ try{ job.print(doc1,attrs); } catch(PrintException ex){System.out.println(ex);} } The printService gets selected like this: PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null); PrintService svc = PrintServiceLookup.lookupDefaultPrintService(); attrs = new HashPrintRequestAttributeSet(); selection = ServiceUI.printDialog(null, 100, 100, services, svc, null, attrs); Here's the stacktrace: at java.awt.Component.dispatchEvent(Component.java:4703)

    Root Cause Analysis

    1. javax.print.PrintException

      Job could not be cancelled.

      at sun.print.UnixPrintJob.cancel()
    2. Java RT
      UnixPrintJob.cancel
      1. sun.print.UnixPrintJob.cancel(UnixPrintJob.java:877)
      1 frame
    3. Unknown
      PrintTest.main
      1. PrintTest.main(PrintTest.java:102)
      1 frame