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

Free Support Forum - aspose.com

Cannot read RTF file

I am attempting open the attached RTF file using new Document(filename) to insert it into a word document that I am generating. Aspose.Words throws an exception.

Both MS Word and Wordpad can open this file without issue. (Although the image does not show up in Wordpad)

If it helps, below is the exception. My apologies for the goofy characters. NUnit did that to the exception.

at Aspose.Words.Document.ࡀ(Exception ࡁ)
at Aspose.Words.Document.࠾(Stream ك, LoadFormat ࠿, String ء)
at Aspose.Words.Document…ctor(String fileName, LoadFormat loadFormat, String password)
at Aspose.Words.Document…ctor(String fileName)
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at System.Drawing.Image.FromStream(Stream stream)
at Aspose.Words.Drawing.ImageData.SetImage(Byte[] imageBytes)

at ↵.⎾.⇄(⊂ ⇃)
at ↵.↴.⇍()
at ↵.↴.⇁()
at ↵.↴.ඉ()
at Aspose.Words.Document.࠾(Stream ك, LoadFormat ࠿, String ء)

For what its worth, I got this exception with the latest version (5.0.2)


Thanks for your reporting this problem to us. I managed to reproduce the problem. I have logged this problem to our defect database as issue # 4565. Please expect a reply before the next hotfix (within 2-3 weeks). We might just fix it by then or provide more information

As a workaround you can re-save this document in MS Word in either RTF or DOC format. I tried this and after saving from Word is was able to open.

Best regards.

The issues you have found earlier (filed as 4565) have been fixed in this update.