Auto Print PDF onload of a JSP Page
843836Aug 9 2003 — edited Apr 29 2005Hello 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