Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic