After saving the file on the server the docx are becoming corrupted. (Attached)
The error is in document.xml Line 3, column 0.
This is an urgent issue. The system is down for now!!!
Thanks
Moshe Yahalomi
Hi Moshe,
Thanks for your inquiry. This does not seem to be an issue in Aspose.Words. You can resolve the problem with DOCX by simply adding
Response.End() after sending document to client browser. For some reasons, when you save a DOCX document to client browser, content of web page is added at the end of the document, you can see this if you open your DOCX document in any binary editor. That is why Microsoft Word cannot open this document. If you add Response.End(), content of web page will not be added and document will be valid. I hope, this helps.
Best regards,
Hi Awais,
Unfortunately you are wrong…
After debugging we found out that the corruption happens inside the client (before any communication with the server). It happens with old aspose version (6.0.1.0)
I’ve saved the byte[] to a file before reading it to aspose document and after (working with memory streams only)
Please note that this is happens only when the files have tables inside.
BTW - The workaround we found is reading the file in new Aspose version (reads OK), save it to doc file, read it again and than save it to docx file.
Thanks
Moshe
Hi Moshe,
Thanks for the additional information.
You’re using a very old version of Aspose.Words. While using the latest version of Aspose.Words for .NET i.e. 13.9.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link:
PS: In case Aspose.Words encounters a problem that can be resolved upon loading a document, it recovers that document silently.
Best regards,