Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Auto Print PDF onload of a JSP Page

843836Aug 9 2003 — edited Apr 29 2005
Hello all,

I am using Apache FOP for PDF generation in our project where we generate the PDF on the fly. After I form the XML from the database data, I apply XSL:FO (XSL) on that on the server side and get back a stream to the JSP with MIME type as "application/pdf". When I select some items from the parent window and press the print button on one browser page, I am able to open a new window where I am directing the PDF output to that JSP page and I am able to see the output the way I want it. AND THIS WORKS BOTH IN NETSCAPE AND INTERNET EXPLORER TOO..

The only problem is that I want to pop the print option just like we do using the onload feature of javascript function (window.print()). This doesnt seem to happen when I am using a PDF within a JSP page....Has anyone tried to do this ?

Please suggest.

Thanks,
Sonu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2005
Added on Aug 9 2003
3 comments
290 views