Not compatible with the latest version of iText #4

Open
halfbaked opened this Issue Dec 20, 2011 · 4 comments

Comments

Projects
None yet
3 participants
Contributor

halfbaked commented Dec 20, 2011

With all the dependencies that one can encounter using this plugin in along with others like the export plugin, I had manually added a dependency to the latest version of iText, but it seems that this breaks if you try use the inLine images. It appears they have changed the constructor of the ImageResource class. They could really have left the original constructor!

Here is the related commit on flying saucer:

flyingsaucerproject/flyingsaucer@f529ecc

Contributor

halfbaked commented Dec 20, 2011

Also if you choose the following dependency:

org.xhtmlrenderer:core-renderer:R9-github-2011-01-11

rather than the earlier R8

you will get:

NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox(I)

Hello halfbaked, did you find a solution for that? I'm working with grails rendering plugin too and i think the provided iText version is too old.

Contributor

halfbaked commented Jun 17, 2012

Hi Patrick, it is quite a while since I look at this so I'm not sure what I did in the end. I definitely use both the export and renderer plugins with inline images now. Here are the relevant dependencies in my build config. They might be some help to you.

dependencies {
    runtime ( 'org.xhtmlrenderer:core-renderer:R8', 'com.lowagie:itext:2.1.0')
}
plugins {
  runtime(':rendering:0.4.3') {
    excludes 'itext'
  }
  runtime(':export:1.1') {
    excludes 'itext', 'itext-rtf'
  }
}

fupelaqu commented Dec 5, 2014

If you want to use a newer itext library, you should use this dependency of core-renderer
'org.xhtmlrenderer:core-renderer:R8-final' (http://wo-repository.doit.com.br/content/repositories/thirdparty/org/xhtmlrenderer/core-renderer/R8-final)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment