How to prevent SVG Image from caching

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to prevent SVG Image from caching

Amita Rathore

I am using data scheme to insert an image. like this :

<fo:instream-foreign-object>
   <svg:svg xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="542px" height="506px">
   <svg:image width="64" height="48" xlink:href="SRC="data:image/gif;base64,1QMMA..." />
   </svg:svg>
</fo:instream-foreign-object>

The image gets cached and the same image is displayed even after I  change the value for xlink:href.

I am resetting the cache also using :org.apache.fop.image.FopImageFactory.resetCache();
       
What should be done to avoid cachig of images. Thanks.        
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent SVG Image from caching

thomas.deweese
Hi Amita,

    Your example is using FOP as the container I am unsure
how you are getting the "image" redisplayed in this
case because as far as I know FOP doesn't support any
dynamic display/manipulation - it is strictly batch.

    Batik by it's self will update the display if the
image reference is updated.  Also I'm guessing it's
a cut and past error but your xlink:href is pretty
badly messed up.

Amita Rathore wrote:

> I am using data scheme to insert an image. like this :
>
> <fo:instream-foreign-object>
>    <svg:svg xmlns:svg="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org/1999/xlink" width="542px" height="506px">
>    <svg:image width="64" height="48"
> xlink:href="SRC="data:image/gif;b|ase64,1QMMA..." />
>    </svg:svg>
> </fo:instream-foreign-object>
>
> The image gets cached and the same image is displayed even after I
>  change the value for xlink:href.
>
> I am resetting the cache also using
> :org.apache.fop.image.FopImageFactory.resetCache();
>        
> What should be done to avoid cachig of images. Thanks.        


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]