I'm trying to add an SVG to a PDF with Apache Batik, but some code
changes made it incompatible with PDFBox 2.0.1.
The first exception is: java.lang.NoSuchMethodError:
org.apache.fontbox.cff.CFFFont.getProperty(Ljava/lang/String;)Ljava/lang/Object;
I tried to manually override the class to add that, and the next errors
where:
- CFFCharset was moved to the parent package, so I added import
org.apache.fontbox.cff.charset.CFFCharset;
- I had to make the setCharset() public
Nevertheless, although I could make a workaround there, a simple SVG
without fonts enters in long loop conversion that never finishes. Also,
I don't know why Batik loads all system fonts and fails on fonts stuff,
but my SVG has no fonts inside :(.
Ivan