When we attempt to save docx pages to images we always get the error “The document appears to be corrupted and cannot be loaded”.
A few things to note:
- .doc files work just fine.
- .docx files never convert
- we are using version 11.2.0.0 of Aspose.Words
Both .doc and .docx files run through a loop like this:
var doc = new Document(fullPath);
for (int i = 0; i < doc.PageCount; i++)
{
var options = new ImageSaveOptions(SaveFormat.Png) { PageIndex = i };
doc.Save(GetImageFileAndPath(fullPath, i+1), options);
}
I’ve attached a sample docx that returns the error.
Any ideas why this is happening?