Jump to content

Image caching with svg


Neobye

Recommended Posts

As far as we could test, the image caching is only working for png (/jpeg/tiff/bmp), but not for scalable graphics like svg.

We would like to use an svg logo in our documents, but when producing documents with tousands of pages, the svg logo is added as many pages as the document has.

I saw, that the used code for svg is absolutely different from the code used for png.
For png, the Renderer is identified by id and stored in a HashMap, so that the image with the same renderer is reused from the map.

While using svg, each svg produces an PdfTemplate with its svg-path in the document.

I would expect the same mechanism as for png, while the svg-path would be stored only once in the pdf, and each re-occurence would just produce a kind of reference in pdf.

I'm not very familiar with itext, but I would expect to have such references in iText.

 

Is there a way to have caching with svg?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...