关注使用BATIK的许多问题和答案,我无法修复我的错误,我找不到任何可能有帮助的东西.而这个
question没有答案.
我的问题是当我下载我的应用程序的pdf,错误发生(我甚至尝试包括jar):
java.lang.ClassNotFoundException: org.apache.batik.dom.svg.SVGOMDocument
在我的碧玉报告中,我已经包括:
<image> <reportElement x="453" y="117" width="246" height="115"/> <imageExpression class="net.sf.jasperreports.engine.JRRenderable"><![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstance(new java.io.File("C:\\Project\\myProject\\web-app\\images\\tomcat.svg"))]]> </imageExpression> </image>
基本上,我的BuildConfig.groovy就是这样的:
inherits("global") { excludes 'xml-apis','xml-apis-ext','xercesImpl' }
和我的依赖:
compile("org.apache.xmlgraphics:fop:0.94","org.apache.xmlgraphics:batik-transcoder:1.7","org.apache.xmlgraphics:batik-codec:1.7","org.apache.xmlgraphics:batik-awt-util:1.7","org.apache.xmlgraphics:batik-bridge:1.7","org.apache.xmlgraphics:batik-dom:1.7","org.apache.xmlgraphics:batik-gvt:1.7","org.apache.xmlgraphics:batik-svg-dom:1.7","org.apache.xmlgraphics:batik-svggen:1.7","org.apache.xmlgraphics:batik-util:1.7","org.apache.xmlgraphics:batik-xml:1.7","org.apache.xmlgraphics:batik-anim:1.7","org.apache.xmlgraphics:batik-css:1.7","org.apache.xmlgraphics:batik-ext:1.7","org.apache.xmlgraphics:batik-js:1.7","org.apache.xmlgraphics:batik-parser:1.7","org.apache.xmlgraphics:batik-script:1.7","org.apache.xmlgraphics:xmlgraphics-commons:1.2","commons-logging:commons-logging:1.0.4","org.apache.avalon.framework:avalon-framework-api:4.3.1","org.apache.avalon.framework:avalon-framework-impl:4.3.1","xalan:xalan:2.6.0","xml-apis:xml-apis-ext:1.3.04" ){ transitive = false
为什么我无法下载?无效的svg?我从维基上获得了this svg.