HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › SVG or embedded pdf Images
- This topic has 6 replies, 4 voices, and was last updated Dec 12, 2012
09:47:10 byAnonymous.
-
AuthorPosts
-
August 10, 2009 at 22:20#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.
Thanks!
August 12, 2009 at 20:01#27430Unfortunately 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.
August 12, 2009 at 20:21#27431Thanks 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!
DavidSeptember 14, 2012 at 14:52#27432Have 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.
Thanks,
MattSeptember 24, 2012 at 18:55#27433We 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.
September 24, 2012 at 19:16December 12, 2012 at 09:47#27435Any update for svg support, please email to me :leiwei1997@yahoo.com.cn
-
AuthorPosts
The forum ‘General questions / FAQ’ is closed to new topics and replies.
