gpc / rendering

Provides rendering of GSPs as PDFs, JPEGs, GIFs and PNGs
http://gpc.github.com/rendering
Apache License 2.0
31 stars 45 forks source link

Not compatible with the latest version of iText #4

Open halfbaked opened 12 years ago

halfbaked commented 12 years ago

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:

https://github.com/flyingsaucerproject/flyingsaucer/commit/f529ecccebaf1941754110eaf2287f392eda139d

halfbaked commented 12 years ago

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)

PatrickHuetter commented 12 years ago

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.

halfbaked commented 12 years ago

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 9 years ago

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)