You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
Now my runtime error is
fr.opensagres.odfdom.converter.core.ODFConverterException: java.lang.NullPointerException: Cannot invoke "org.odftoolkit.odfdom.pkg.manifest.OdfFileEntry.getEncryptionData()" because "manifestEntry" is null
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()'
The text was updated successfully, but these errors were encountered: