If your web application needs to print PDF's silently on the browser, then check out this blog.
Of all options given, I found the iText trick the simplest to use. The concept is quite simple:
- Create a PDF on the fly using iText
- Open the PDF document in a iFrame that is hidden (size 0*0)
A live example can be found here.