Hi!
I try to load / convert the attached ODT document.
The ODT document is validated by ODT 1.1 and seems to be correct.
I try the following:
com.aspose.words.Document ad = new com.aspose.words.Document(is);
and get the Stacktrace:
Exception in thread "main" com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
at com.aspose.words.FileFormatUtil.ëY(Unknown Source)
at com.aspose.words.Document.ëY(Unknown Source)
at com.aspose.words.Document.ëZ(Unknown Source)
at com.aspose.words.Document.<init>(Unknown Source)
at com.aspose.words.Document.<init>(Unknown Source)
at com.aspose.words.Document.<init>(Unknown Source)
at nl.pna.cognitatie.reader.aspose.ConvertDocumentFix.init(ConvertDocumentFix.java:49)
at nl.pna.cognitatie.reader.aspose.ConvertDocumentFix.getInstance(ConvertDocumentFix.java:40)
at aspose.AsposeOdtTest.convertFix(AsposeOdtTest.java:37)
at aspose.AsposeOdtTest.main(AsposeOdtTest.java:24)
Caused by: java.lang.NullPointerException
at com.aspose.words.ëZUA.ëZ(Unknown Source)
at com.aspose.words.ëZUA.ëO(Unknown Source)
at com.aspose.words.ëZUA.ëp(Unknown Source)
at com.aspose.words.ëZUA.ëZ(Unknown Source)
at com.aspose.words.ëZSY.ëZ(Unknown Source)
at com.aspose.words.ëZTT.read(Unknown Source)
at com.aspose.words.Document.ëY(Unknown Source)
... 8 more
I find out, that the problem is in the footer of “style.xml”:
<text:notes-configuration
xmlns:sdu-fn="http://schema.sdu.nl/2011/07/functions"
text:note-class="footnote" text:citation-style-name="Footnote_20_symbol"
text:citation-body-style-name="Footnote_20_anchor"
style:num-format="1" text:start-value="0"
text:footnotes-position="page"
text:start-numbering-at="document" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" />
Can you reproduce the error?
How can I solve the problem?
Kind regards,