Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #26240

    Does pd4ml include support for svg images included in the html document, or any other vector graphics? I have an image creation script that can also write out the images I am using as an svg or pdf (as well as gif/png which I use in the web pages). if I could directly embed those into the pd4ml document rather than using a gif/png, it would decrease the size of large documents, and increase image quality.



    Unfortunately PD4ML does not support SVG graphics. SVG format is comparable by complexity to PDF itself and a fair implementation of SVG support module is not a trivial task.

    We considered to use open-source SVG renderers, but were not satisfied with the existing libraries.

    We are trying to keep PD4ML compact and performant, so we do not use general-purpose XML parsers, HTML code normalizers etc. Everything we use is custom developed (parsers, for example, with JavaCC) and specialized for HTML rendering and PDF output. As a result we have only 2 JARs, 635KB in size.

    An adding of bulky 12MB of Batik (an open-source SVG library) just to support a single image format, was unacceptable from our perspective.

    Nevertheless the SVG support is still in our TODO list. Most probably we’ll implement a plugable interface for vector graphics writers and an optional Batik-interface module is going to be an implementation of it.


    Thanks very much for the prompt response. i appreciate the lightweight and fast performing nature of pd4ml.

    I may attempt to implement something that takes output from pd4ml and replaces images with vector images using iText. I will let you know if I get anything to work like that, but I doubt I’ll be able to. That will be neat if/when it gets implemented into pd4ml. Keep up the good work!

    Thanks again!


    Have there been any updates/changes with regard to this? I’m considering using a charting library that generates SVG charts. I could use Batik to convert those to JPEG/PNG, but it would be great if I could instead embed the SVG in the PDF.



    We plan to return to the topic in October-November 2012. Hopefully we’ll find a good lightweight SVG library. There are few candidates; and we prefer not to use Batik.


    Thanks for the update. I look forward to any future updates on this.



    Any update for svg support, please email to me

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘General questions / FAQ’ is closed to new topics and replies.