Geeks With Blogs

Blue Probe It’s the parting gift when you host an alien abduction

Problem: Trying to open an Aspose produced .docx gives an “unreadable content” error. The file will still open up in MSWord but you have to click past warning messages. Interestingly enough, if you open the .docx as a zip file, which is what it is, and then unzip and rezip, then the .docx will open just fine in MSWord.

Solution: Our code did a MailMerge followed by:

WordTemplate.Save(out_ms, Aspose.Words.SaveFormat.Docx);

Then we added an extra blank page and that code created another Aspose.Words.Document from the first and at the end of the method it again did a:

xxx.Save(out_ms, Aspose.Words.SaveFormat.Docx);

Doing the Save twice caused the problem.

Posted on Friday, February 7, 2020 12:54 PM | Back to top


Comments on this post: Aspose.Words “unreadable content”

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Ken Hortsch | Powered by: GeeksWithBlogs.net