Open thekeenmonk opened 7 years ago
Hi @ketanmpandya
The project hasn't been debugged with batik 1.9, although it looks like it could be a clipping problem. I'd suggest using the maven shade plugin to repackage batik in a custom svg-support pom. The closest I could come to find a guide on how to do this is at the below link. https://www.elastic.co/blog/to-shade-or-not-to-shade
If you do get this working (or not), please let us know so others can learn. Good luck.
@ketanmpandya This is rather an issue with pdfbox-graphics2d than with openhtmltopdf, as the SVG rendering runs through pdfbox-graphics2d. I've opend an issue and will investigate whats going wrong here. A sample SVG file to reproduce the bug would awesome.
@ketanmpandya I can confirm that upgrading batik to 1.9 breaks the SVG rendering with pdfbox-graphics2d.
I've created the pull request #104 which fixes that bug. My PDFBox-Graphics2D adapter had a bug with getClip() and clip(Shape). I've released a fixed version 0.5. You can wait till @danfickle merges this pull request and releases a fixed version or you can just add this dependency to your project
<dependency>
<groupId>de.rototor.pdfbox</groupId>
<artifactId>graphics2d</artifactId>
<version>0.5</version>
</dependency>
I found that the same SVG code that renders fine with batik 1.8 does not render properly with batik 1.9. No errors are visible in logs but the rendering is incomplete. I need to integrate with an existing project that uses batik-1.9 jars. Is there a known incompatibility with batik 1.9?
Output with batik-1.8 (correct):
Output with batik-1.9 (incomplete):