On Jun 6, 2008, at 10:43, Antti Karanta wrote:

Hi

I have an issue that I think is due to FOP caching images. The situation is this:

* FOP is embedded in our software. I create a single FopFactory and create a new FOP instance via it for each render. * I render a pdf with fo that references some svg image files. It comes out fine.
* Some of the svg image files are updated on the hard drive.
* I render a pdf again (w/ the same name, new FOP instance though, but created via the same fop factory instance). The image that has been changed on disk appears as it was before it was updated.

Indeed. If the URI for the image is the same in both cases, then the second time, the image will be fetched from the cache. The ImageCache itself is no longer part of FOP, but resides in XMLGraphics Commons now.

Unfortunately, AFAIK, we still have no way of signal to the image- loading framework that a particular image must not be cached.

One possible solution would be to do the following, after rendering the document the first time:

org.apache.xmlgraphics.commons.image.loader.cache.ImageCache.clearCache( );


The downside is obviously that ALL cached images will now be released.



HTH!

Cheers

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to