You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Swee Yueng <sy...@radworkz.com> on 2003/05/22 09:13:07 UTC

Graphic Problem

Hi,

    I wrote a program to retrieve some data from database and then generate a xml file by using JDOM. Then, I use FOP to generate the PDF file. It works fine but later I found out the image in the PDF file will not get refresh until I restart tomcat, even I tried to delete the PDF file and regenerate again, the problem still exists. 

    If I delete the image from the folder and regenerate the PDF file, it get refreshed. If I put in the image which is not exist in the folder previously and regenerate the PDF file, it also get refreshed. The problem exists when I update the old image with a new image (same file name) and regenerate PDF, the image won't get refresh (i.e.: still showing the old image) until I restart tomcat. The tomcat I'm using is version 4.1.24. May I know is there any API that can allow me to force the image to get refreshed or this is a bug? Is it something wrong with my tomcat configuration or fop? Is there any documentation or example that I can follow? I try to look around but couldn't get any. Thanks for any help...


Re: Graphic Problem

Posted by Jeremias Maerki <de...@greenmail.ch>.
I've documented the behaviour recently, but the text hasn't made it to
the main site, yet. Please follow the following URL for a solution:
http://forrestbot.cocoondev.org/sites/xml-fop/graphics.html#caching

I hope this helps.

On 22.05.2003 09:13:07 Swee Yueng wrote:
>     I wrote a program to retrieve some data from database and then generate a xml file by using JDOM. Then, I use FOP to generate the PDF file. It works fine but later I found out the image in the PDF file will not get refresh until I restart tomcat, even I tried to delete the PDF file and regenerate again, the problem still exists. 
> 
>     If I delete the image from the folder and regenerate the PDF file, it get refreshed. If I put in the image which is not exist in the folder previously and regenerate the PDF file, it also get refreshed. The problem exists when I update the old image with a new image (same file name) and regenerate PDF, the image won't get refresh (i.e.: still showing the old image) until I restart tomcat. The tomcat I'm using is version 4.1.24. May I know is there any API that can allow me to force the image to get refreshed or this is a bug? Is it something wrong with my tomcat configuration or fop? Is there any documentation or example that I can follow? I try to look around but couldn't get any. Thanks for any help...


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Graphic Problem

Posted by Torsten Erler <To...@net-linx.com>.
The Problem is located at FOPImageFactory.

The m_urlMap caches the url of the Image to the produced FopImage (it
doesn't check for last modified or something else, so you get the same image
for the url until the image reference is cleared).

Solution:

in FOP 0.20.5rc2 you can call FopImageFactory.resetCache()
in FOP 0.20.4 you have to implement it by yourself and recompile FOP ;(
cu Torsten

  -----Original Message-----
  From: Swee Yueng [mailto:sy.fun@radworkz.com]
  Sent: Donnerstag, 22. Mai 2003 09:13
  To: fop-user@xml.apache.org
  Subject: Graphic Problem


  Hi,

      I wrote a program to retrieve some data from database and then
generate a xml file by using JDOM. Then, I use FOP to generate the PDF file.
It works fine but later I found out the image in the PDF file will not get
refresh until I restart tomcat, even I tried to delete the PDF file and
regenerate again, the problem still exists.

      If I delete the image from the folder and regenerate the PDF file, it
get refreshed. If I put in the image which is not exist in the folder
previously and regenerate the PDF file, it also get refreshed. The problem
exists when I update the old image with a new image (same file name) and
regenerate PDF, the image won't get refresh (i.e.: still showing the old
image) until I restart tomcat. The tomcat I'm using is version 4.1.24. May I
know is there any API that can allow me to force the image to get refreshed
or this is a bug? Is it something wrong with my tomcat configuration or fop?
Is there any documentation or example that I can follow? I try to look
around but couldn't get any. Thanks for any help...