-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Hi
My code is able to generate the target odt file, but failing to generate target pdf file. I am using below libraries & code and pasted the error below. please help me.
libraries
xdocreport-2.1.0.jar
slf4j-api-1.7.2.jar
velocity-engine-core-2.4.1.jar
odfdom-java-0.12.0-jar-with-dependencies.jar
itext-2.1.7.jar
java code
IXDocReport report = XDocReportRegistry.getRegistry().loadReport(infile, TemplateEngineKind.Velocity);
IContext context = report.createContext();
context.put("name", "tester");
OutputStream outfile = new FileOutputStream(new File("outfile.odt"));
report.process(context, outfile); //this is working perfectly
OutputStream outfile1 = new FileOutputStream(new File("outfile.pdf"));
Options options = Options.getTo(ConverterTypeTo.PDF).via(ConverterTypeVia.ODFDOM);
report.convert(context, options, outfile1); //this is giving problem and generating zero size pdf file
runtime error
java.lang.NoSuchMethodError: 'org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles org.odftoolkit.odfdom.dom.OdfStylesDom.getAutomaticStyles()'