We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error when reading a Word document

We encountered the following exception when reading a Word document with Aspose:

End of header/footer is out of sync. For free technical support, please post this error and the file in the Aspose.Words Forums 
http://www.aspose.com/forums/ShowForum.aspx?ForumID=75. SourceAspose.Words
StackTrace: at x16f9a31f749b8bb1.x73fe5008aa2120db.xf2a92fd4e4c01209() at x16f9a31f749b8bb1.x32eac27632acc346.x7319f5f5433dca3a(HeaderFooterType xa685fef1a31f5d4d) at x16f9a31f749b8bb1.x32eac27632acc346.x709a32d98832a838() at x16f9a31f749b8bb1.x32eac27632acc346.x1f490eac106aee12() at x16f9a31f749b8bb1.x0f8a9a895bdf560e.x06b0e25aa6ad68a9() at Aspose.Words.Document.x5d95f5f98c940295(Stream xcf18e5243f8d5fd3, LoadFormat xdef7b99b7fc67519, String xe8e4b5871d71a79a) at Aspose.Words.Document..ctor(Stream stream) at vu.AsposeToBuzzword.AsposeToBuzzword..ctor(String title, Stream stream) 

when doing

_fromDoc = new Document(stream);

Unfortunately I can’t upload the document because it’s confidential. Does this provide you with anything useful?

Thanks for your reporting this issue. But can’t reproduce your problem without your document. Please attach the document to reproduce problem. Attached documents on this forum can be seen by Aspose team and you. If it does not suit you, you can send the document to us by E-mail and/or provide an NDA to sign.
Here is my E-mail: vitaly.shtanko@aspose.com
Best regards.

OK, I’ve managed to strip down the document, and still have the problem occur. I’m not sure if this was originally created in Word or if it was converted from something else. I’ve attached it.
One thing to note is that if I save the document as RTF using Word 2003, I still have the same problem “End of header/footer is out of sync” problem when converting it with Aspose. If I then try to load that RTF file in Word again, Word says that the document has errors, including a problem with the table in the footer, and offers to repair them. If I repair them and then try to convert the repaired RTF file using Aspose, it works fine. So there may be truly something wrong with the orignal Word document.
I’ll try to find out how it was created.

Thanks for additional information. I have reproduced this bug and logged it to our defect base as issue # 3767. We will try to fix it in one of our future releases. A notification will be posted here in this thread as soon as it is done.
Best regards.

We have released a new version of Aspose.Words that contains a fix for your issue.
issue #3767 - “End of story is out of sync” exception occurs when open document using Aspose.Words.

new version of Aspose.Words is available for download from
Best regards.