Error: System.IO.InvalidDataException: The Md5 hash is not correct for object declaration struct

I am getting the following error while I convert .one to .pdf using 'Aspose.Notes.dll'

System.IO.InvalidDataException: The Md5 hash is not correct for object declaration struct.
.................................
at .e.( , UInt64 , UInt64 )
at ..()
at ..(Stream , Document )
at Aspose.Note.Document.(Stream )
at Aspose.Note.Document..ctor(Stream instream)


Below is my code :

System.IO.MemoryStream stream = new System.IO.MemoryStream();
Aspose.Note.Document doc = new Aspose.Note.Document(new MemoryStream(docContentBytes));
doc.Save(stream, Aspose.Note.SaveFormat.Pdf);


Any one please help.

Hi Rajani,


Thanks for your inquiry. Have you tried Aspose.Words for .NET (Latest Version)?

In case the problem still remains, please attach your input document here for testing. We will investigate the issue on our end and provide you more information.

Best regards,

Hi ,

Thanks a lot for your reply. Here is my new scenario.


We have a ".one" format document which is of size 133MB (confidentil document). Hence i can not upload that document.. sorry.

We found that, the original ".one" format document can be converted to .pdf. But when that document is edited and tried to convert, it thows error "System.IO.InvalidDataException: The Md5 hash is not correct for object declaration struct."


As you suggested, I have used the latest dll. Here in my case, Aspose.Notes.dll version (Aspose.Note for .NET 2.5.0). Now the above problem got resolved.

But while executing the below line, its giving us error "System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown"

Below is my code:

System.IO.MemoryStream stream = new System.IO.MemoryStream();
Aspose.Note.Document doc = new Aspose.Note.Document(new MemoryStream(docContentBytes));

doc.Save(stream, Aspose.Note.SaveFormat.Pdf); -- Here, the error occurs.

Please help.

Hi Rajani,


Thanks for the additional information. I am moving your thread in Aspose.Note forum where you’ll be guided appropriately.

Best regards,

Hi Rajani,


We need your sample .one file for reproducing the problem at our end and investigate it further. You can place your file on public storage drivers such as Dropbox or Google drive and share the link to file with us here for our further consideration. This thread has been marked as private so you don’t need to worry about loosing the confidentiality of the file.

Looking forward to assist you.