Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to display an image while waiting for PDF to render?

 
jay chris
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I would like to display an image (animated gif) to my user's when they wait (and wait and wait) for FOP to render my PDF. Does anybody have
a snippet of code that can do this? Currenty I open up a new window using javascript and the page name has a PDF extension.
Thanks
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a more or less related article in the March 2004 issue of the JavaRanch Journal by Kyle Brown. Although in Kyle's article the long-running process is an SQL query, your problem seems to be pretty identical.
In short, start the FOP process in the background and direct the user's browser to a self-refreshing page which polls every two to three seconds whether the FOP process has finished generating the PDF file somewhere. If it has, display the PDF file. If it hasn't, display the self-refreshing page again.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
REad this thread as well, it has a definitive answer for your problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic