Skip to content

unable to generate pdf file #10

@ysreddymca

Description

@ysreddymca

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()'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions