Thankyou very much for helping. I tried your code. Nothing got printed neither any errors.
I tried for the code below. The code also didn't work.
I am quite screwed up here. Neither I'm getting the expected output nor any errors are traced. I'm using network printer. Printer gets the document printed from other application but the code doesn't work leaving me no clue.
I tried your code and although it seems correct and same as the sample provided in the Java 6 API Docs, you need to wait for the Printing Job to be completed before closing the InputStream.
I added the code provided in the above URL, but it still didn't work for me. Thus, I added a Thread.sleep(20000); //sleep for 20 seconds to allow for Job to be completed, and then close the input stream.
Try this, hopefully it will work for you.
Ritesh<br /> <br />SCJP 1.4<br />IBM Test 340<br />IBM AIX V4.0 Certified Professional<br /> <br />Right actions for the future are the best apologies for wrong ones in the past.<br />- Tyron Edwards