Hi
I was trying to convert a HTML file to docx with Aspose.Words 22.5, and I received the next error
Aspose.Words.FileCorruptedException -> The document appears to be corrupted and cannot be loaded.
inner exception -> Object reference not set to an instance of an object.
at .(Paragraph , , Boolean )
at .(Table )
at . ( )
at .( , Boolean , )
at . ( , Boolean )
at .( , Boolean )
at .(Stream , Encoding , DocumentBuilder )
at . ()
at Aspose.Words.Document.(Stream , LoadOptions )
After did some test, I found that the issues is on a consecutive tables with next structure (the second one is on a <div></div>
)
<body style="font: 10pt Times New Roman, Times, Serif">
<div>
<table>
<tr>
<td>a</td>
</tr>
</table>
<div>
<table>
<tr>
<td>b</td>
</tr>
</table>
</div>
</div>
</body>
I tested the next scenarios:
- If i remove the internal div (body/div/div). It works
- If i remove the content on the second table, It works
- If I separate the tables with an empty div,
<div></div>
, I works - If i separate the tables with an empty paragraph (
<span> </span>
), It works
Thanks,
Lisandro