I want to use both Jasper Reports (vanilla, never got the Grails Jasper plugin to work - see this) and Grails Rendering plugin (one is more suitable for some reports, another for others).
If I include 'com.lowagie:itext:2.1.5' or 'com.lowagie:itext:4.2.1' then I am missing com.lowagie.text.pdf.BaseFont.getCharBBox upon running the Rendering plugin's PDF report.
If I include 'com.lowagie:itext:2.0.8' then I am missing com.lowagie.text.pdf.PdfWriter.setRgbTransparencyBlending upon running Jasper's PDF report.
Both are failing with java.lang.NoSuchMethodError-s.
I haven't tried with the latest iText versions, but they have different package names and more restrictive licensing, so I don't think they would be a good fit.
My BuildConfig.groovy looks like this (one of the first 3 dependencies gets uncommented):
dependencies {
// runtime 'com.lowagie:itext:4.2.1' // missing.BaseFont.getCharBBox
// runtime 'com.lowagie:itext:2.0.8' // missing PdfWriter.setRgbTransparencyBlending
// runtime 'com.lowagie:itext:2.1.5' // missing.BaseFont.getCharBBox
compile 'net.sf.jasperreports:jasperreports:5.2.0' // needed by jasper
runtime 'org.springframework:spring-test:3.2.4.RELEASE' // needed by rendering plugin
runtime 'commons-collections:commons-collections:3.2.1' // needed for jasper
}
plugins {
// ...
compile ":rendering:0.4.4"
// compile ":jasper:1.6.1" // couldn't get this to generate anything, but not sure it would help any
// ...
}
Is there any "old" version of iText (MPL-licensed) that I could try that may work?
Is there some way to ask Maven/Gradle to make it so that I can ask one of the libraries/plugins to use one version of iText, and another the other?