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

Free Support Forum - aspose.com

Aspose gives FileCorruptedException for rtf, but Microsoft Word opens fine

Hello,

When I try to create an Aspose.Words.Document via the constructor with the following rtf (Rtf.zip 48.3 KB), it throws a “Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded. —> System.ArgumentOutOfRangeException: Non-negative number required.”.

However, Microsoft Word is able to open the rtf without any issue. I am currently on version Aspose.Words 19.3.0. Maybe the latest 21.6.0 doesn’t have this issue? If anyone can help it would be greatly appreciated.

Thanks!

@ArsenioL32,

You’re right, the current version of Aspose.Words also throws the following exception upon loading this particular RTF file:

Aspose.Words.FileCorruptedException
HResult=0x80131500
Message=The document appears to be corrupted and cannot be loaded.
Source=Aspose.Words
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
ArgumentOutOfRangeException: Non-negative number required.
Parameter name: count

We have logged this problem in our issue tracking system with ID WORDSNET-22450. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

1 Like

The issues you have found earlier (filed as WORDSNET-22450) have been fixed in this Aspose.Words for .NET 21.8 update and this Aspose.Words for Java 21.8 update.