Saving docx file to images always errors

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?
Hi Dean,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for .NET 16.6.0 and have not found the shared issue. Please use Aspose.Words for .NET 16.6.0 and let us know if you have any more queries.

Do I need to upgrade to do that?

Hi Dean,


Thanks for your inquiry. Yes, please download 16.6.0 version of Aspose.Words from the following link:
http://www.aspose.com/downloads/words/net/new-releases/aspose.words-for-.net-16.6.0/

Hope, this helps.

Best regards,