I have deployed my
java application on a Solaris system.A network printer is connected to this Solaris machine.And from within the java application I am firing a print using Java's Print API.
I am printing a GIF document.But the printer outputs junk characters onto the pages.When the same thing is done on an application deployed on a Windows system and print is fired to a printer attached to this Windows system it prints properly.
Can someone advise me on what would be the problem and how to rectify it?
Please note that Xvfb is present on the Solaris system.I also set the System property java.awt.headless as true inside my application.
Inspite of this when I try and print I am getting the following Exception when I try to print a txt file:
java.awt.print.PrinterException: Printer is not accepting job.
2008-07-02 13:15:57.108 [info] at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1231)
2008-07-02 13:15:57.108 [info] at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1197)
2008-07-02 13:15:57.108 [info] at nia.ps.engine.runtime.printer.TextPrinter.doPrint(TextPrinter.java:216)
2008-07-02 13:15:57.108 [info] at nia.ps.engine.runtime.printer.TextPrinter.print(TextPrinter.java:177)
2008-07-02 13:15:57.108 [info] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2008-07-02 13:15:57.108 [info] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2008-07-02 13:15:57.108 [info] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2008-07-02 13:15:57.108 [info] at java.lang.reflect.Method.invoke(Method.java:585)
2008-07-02 13:15:57.108 [info] at nia.ps.engine.runtime.dispatcher.PrintDispatcher.printDocs(PrintDispatcher.java:141)
2008-07-02 13:15:57.108 [info] at nia.ps.engine.runtime.dispatcher.PrintDispatcher.process(PrintDispatcher.java:85)
2008-07-02 13:15:57.108 [info] at nia.ps.engine.runtime.dispatcher.PrintDispatcher.prepareToPrint(PrintDispatcher.java:48)
2008-07-02 13:15:57.108 [info] at nia.ps.engine.runtime.dispatcher.PrintDispatcher.firePrint(PrintDispatcher.java:27)
2008-07-02 13:15:57.108 [info] at nia.ps.engine.PrintEngine.runJob(PrintEngine.java:44)
2008-07-02 13:15:57.108 [info] at nia.ps.engine.PrintEngine.spooler_process(PrintEngine.java:65)
Any help friends?