Free Support Forum -

Converting document to PDF

When I try to convert the .ods format file to pdf it throws me an exception, but when i save the same file as .xls it produce me a pdf file.

below is the code that I am using to convert it to PDF (java)

Workbook workbook = new Workbook();“abc.ods”);“abc.pdf”,FileFormatType.PDF);

Also can you please let me know all the formats that can be converted to pdf.



Please attach your sample ods file, so that we could check your issue on our end.

Thank you.

Attached is the ods file ,
below is the exception that I am getting

Exception in thread “main” java.lang.NoSuchMethodError:
at com.aspose.cells.fX.d(Unknown Source)
at com.aspose.cells.fX.a(Unknown Source)
at com.aspose.cells.fX.a(Unknown Source)
at com.aspose.cells.iG.a(Unknown Source)
at com.aspose.cells.iG.a(Unknown Source)
at Source)
at AsposeTest.main(


Well, I have tested your case and it works fine. The ods file is converted to pdf just fine. I think you are not setting dom4j jar file into your classpath, so you are getting this error.
There are certain features that demand other jar files (dependencies) to be used or set into the class path with main Aspose.Cells’s jar file. You should deploy all these JAR files to make Aspose.Cells work properly in all scenarios with all the features.

Below is a complete list of these other jar files,

You may download the additional files from here:

Thank you.

My bad,

Thanks for your prompt reply