wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes PDF download .. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "PDF download .." Watch "PDF download .." New topic
Author

PDF download ..

Mufaddal Khumri
Greenhorn

Joined: Jun 13, 2002
Posts: 9
Hi,
I have a servlet that generates a PDF document and then sends it to the clients browser. If the client has a PDF plugin for his or her browser, the PDF document opens in the client's browser window, else the client gets a dialog box asking him to save the PDF document to his or her hard disk.
In my web application the client clicks a link which invokes a smaller child window for the PDF to be displayed in. The problem I am facing is that while the PDF is being generated, I need to show the client some kind of notification in this child browser window. How do I do this ?
I tried one approach that is i write the header information in my servlet and flush that, so that the client gets that information and starts displaying the PDF as its being genrated, but that did not work. The PDF gets generated sent and then only does it appear in the child window.
Any help on this will be appreciated.
Thanks.
Chris Baron
Ranch Hand

Joined: Mar 21, 2003
Posts: 1049
Hi
i'd try the following:
Load a plain html page into the popup first, wich contains the notification and a Javascript that calls the servlet.
Usually the old page stays in the browser, so the notification should be shown while the pdf is generated and sent back to the client.

No guarantee for this, you have to try
cb
[ September 21, 2003: Message edited by: Chris Baron ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PDF download ..