From: Dorian on
I have a project in Matlab for my workplace and that consists of converting an html file into a pdf file. Since I haven't found any direct conversion in Matlab I fought I could use Java for implementing the conversion . After finishing the java implementation that works just fine I have tested it in Matlab where I get the same annoying error about a non existing method in some package I use :

"Java exception occurred: java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox(C)[I at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.setMetricDefaults(ITextFontResolver.java:679) at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.<init>(ITextFontResolver.java:610) at org.xhtmlrenderer.pdf.ITextFontResolver.addCourier(ITextFontResolver.java:410) at org.xhtmlrenderer.pdf.ITextFontResolver.createInitialFontMap(ITextFontResolver.java:390) at org.xhtmlrenderer.pdf.ITextFontResolver.<init>(ITextFontResolver.java:52) at org.xhtmlrenderer.pdf.ITextRenderer.<init>(ITextRenderer.java:115) at org.xhtmlrenderer.pdf.ITextRenderer.<init>(ITextRenderer<init>)

I have added the jar files and the .class files in Matlab's javaclasspath corectly - I have tried both with the static classpath and the dynamic path , I have checked the packages to see whether the method that is invoked as inexistent isn't there - it is and has the same signature in both packages that it is used , more than that both Java and Matlab use the same jars (while compiling and executing),the object I use for conversion instantiates etc.. I have run out of ideas!!

I am using Matlab 2007b (due to compatibility problems with the program I have to build the converter for) , Java 1.6_18, and the jars used for conversion are : IText 2.0.8 , core-renderer R8 and JTidy R9.