Hi I'm using FOP in a JSP to return dynamically created PDF documents to browsers. I'm using the usual method of embedding FOP as described on the web site. It works great. The main problem is that the PDFs take about 20 seconds to generate and then, since they are 500K or so, a while to download depending on connection speed.
I'd like to be able to put a message on an intermediate page which could refresh and only return the PDF when it is ready. At the moment, they are just seeing a blank page until the PDF is complete. Does anyone have any ideas for this ? Can I flush some output to the page to advise them to be patient, then reset the response and send the PDF when it is ready? Alternatively. I was thinking of doing something a bit more ambitious which would be to output the PDF to a database blob, then send back a page which refreshes to a JSP which keeps checking whether the PDF has been finished. When it is, I could fetch the data outofthe BLOB and send it back. I have seen other sites where the PDF was output to a static file on the website. Then the JSP would refresh and keep checking until the file was present. When the file was created, the page would appear with a link to the file. The main problem with this is security. There is the potential that everyone would have access to all PDFs on the web site, although on a site without listings, they'd need to be making pretty inspired guesses to find and download it. How do others get around this ? I imagine its quite a common problem. Thanks Chris