I have a project where I want to be able to format xhtml documents into both PDF format and Docx format.
I've been using flyingsaucer to format PDF documents for some time and always had to use an older version of iText for compatibility reasons. Now that I'm using docx4j I need to update iText to a more recent version or it won't work.
FlyingSaucer (xhtmlrenderer R8pre2) uses iText 2.0.8
docx4j 2.8.0 uses iText 2.1.7
I can only use one iText library but whichever one I use I end up with compatibility issues for either flying saucer or docx4j.
At the moment the problem seems to come down to one particular method (com.lowagie.text.pdf.BaseFont.getCharBBox
) which in one version takes a char
parameter and in the other it takes an int
parameter.
I think I may have to download sources for either flyingsaucer or iText (I think they're both open source) and fix this myself (not something I've done before but I think I could manage) but I can imagine I'm not the 1st person to run into this problem and perhaps there's another way around it or someone else has already forked one of the projects to resolve this sort of issue.