• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
REad this thread as well, it has a definitive answer for your problem.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic