Aspose cannot decrypt document

The attached document is encrypted with the password test. Aspose cannot open it when encrypted, but when decrypted using word, the document is OK. (Re)Encrypting it with a password breaks the document.




The following code is used to open the document:


string thePassword = “test”;


Document theSourceFile = new Document(theFileName, LoadFormat.FormatAuto, thePassword);

Thanks for reporting. We are working on that issue.

I looked at the issue. The problem is really caused by some internal error in the document. The row in the table (second table in the body) whose last cell contains:

a


a a


a a

That end of row is damaged in the document. I could not find out how to recover from this error easily. You should open this document in MS Word, recreate the table (maybe just the row) and save it, it should work fine. In fact, just opening the document in Word 2003 and saving it, seems to fix the problem with the document.

Since this appears to be a singular abnormality in document structure and no easy way to recover from it, I'm not going to fix this in Aspose.Word unless you have many documents like this and resaving them in MS Word is an issue.