HTML conversion issues: FileCorruptedException

Hi Aspose Support.

While trying to open HTML / HTM document using Words (I've seen instruction on your web page ages ago, yet I cannot find it right now) using this code I do got following error:

Document asposeDocument = null;
try {
asposeDocument = new Document(new ByteArrayInputStream(htmlDocument));
} catch (Exception e) {

Caused by: com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
at com.aspose.words.FileFormatUtil.zzY(Unknown Source) ~[aspose-words-14.3.0.jar:14.3.0.0]
at com.aspose.words.Document.zzY(Unknown Source) ~[aspose-words-14.3.0.jar:14.3.0.0]
at com.aspose.words.Document.zzZ(Unknown Source) ~[aspose-words-14.3.0.jar:14.3.0.0]
at com.aspose.words.Document.(Unknown Source) ~[aspose-words-14.3.0.jar:14.3.0.0]
at com.aspose.words.Document.(Unknown Source) ~[aspose-words-14.3.0.jar:14.3.0.0]
at com.aspose.words.Document.(Unknown Source) ~[aspose-words-14.3.0.jar:14.3.0.0]

In attachment two html/htm files, generated automatically by one of our applications: original -crashing-versions and the working ones, without specific tag inside tag.

Please advice if there's a way, a workaround for this error.

Thank you very much,
Kind regards,

Michał Wasiak


Hi Michał,


Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 14.5.0, I managed to reproduce this issue on my side. I have logged two issues in our bug tracking system. The IDs of these issues are WORDSNET-10331 and WORDSNET-10332. Your thread has been linked to these issues and you will be notified as soon as they are resolved. Sorry for the inconvenience.

Best regards,