Hi,
I have attached the document that contains 3 images which throws a FileCorruptedException when trying to save as a HTML.
Could you let me know what might be the reason for this?
Aspose.Words for .NET Version 15.8.1.0
Exception:
Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: offset
at System.Web.HttpInputStream.Seek(Int64 offset, SeekOrigin origin)
at .()
at .(Stream )
at .()
at .(Stream )
at Aspose.Words.Document.(Stream , LoadOptions )
--- End of inner exception stack trace ---
at Aspose.Words.Document.(Stream , LoadOptions )
at Aspose.Words.Document.(Stream , LoadOptions )
Code:
Aspose.Words.Saving.HtmlSaveOptions saveOptions = new Aspose.Words.Saving.HtmlSaveOptions()
{
AllowNegativeIndent = true,
SaveFormat = SaveFormat.Html,
ImagesFolder = destinationFolder,
ImagesFolderAlias = destinationFolder,
ExportHeadersFootersMode = Aspose.Words.Saving.ExportHeadersFootersMode.FirstPageHeaderFooterPerSection,
};
Document doc = new Document(inputStream);
Thanks,
Stallin