I am unable to correctly open ODT file in Java Spire.Doc and convert them to PDF.
When I load it via
- Code: Select all
doc.loadFromStream(file, FileFormat.Auto);
- Code: Select all
Caused by: class com.spire.doc.packages.spriuo: Error loading file: Unsupported file format
Parameter name: input
It behaves the same if I specify format on input (FileFormat.Odt).
If I load it via
- Code: Select all
doc.loadFromFile(odtFile.getAbsolutePath());
it processes first page and then writes this (not fail, just log, but only first page is returned)
- Code: Select all
java.lang.Exception: File format Cannot be recognized.
at com.spire.doc.Document.spr⅓┐—(Unknown Source)
at com.spire.doc.Document.loadFromFile(Unknown Source)
Test file attached.
Thanks a lot,
Jan.