I am an exception when trying to load an RTF file into a Document.
Here is the exception:
==== Inner Exception ====
Name: NullReferenceException
Message: Object reference not set to an instance of an object.
StackTrace:
at .(Cell )
at .(Row )
at .(Row )
at . ()
at .( )
at .( )
at . ( )
at .( )
at . ()
at Aspose.Words.Document.(Stream , LoadOptions )
HResult: 0x80004003
Source: Aspose.Words
Here is my code snippet:
using(var stream = attachment.OpenDataStream(cancellationToken))
{
var loadOptions = new LoadOptions { LoadFormat = LoadFormat.Rtf };
var document = new Document(stream, loadOptions);
}
Here is the RTF file with the issue:
RtfWithIssue.zip (34.4 KB)