RTF Error firstColumn value out of range

We use Aspose.Words to convert RTF documents to PDF and HTML. This is actually an error with loading an RTF document we get from our Epic EHR. The following is the stack trace, and I’ll attach the document. It appears to be an issue with the table structure generated by Epic. However, I don’t know more than that. I stripped the content of the document, since it contained PHI. If the RTF looks a bit weird, it probably is – Epic seems to generate some weird RTFs.

com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
	at com.aspose.words.FileFormatUtil.zzYZ8(Unknown Source)
	at com.aspose.words.Document.zzO1(Unknown Source)
	at com.aspose.words.Document.zzXQW(Unknown Source)
	at com.aspose.words.Document.<init>(Unknown Source)
	at com.aspose.words.Document.<init>(Unknown Source)
	at org.emerse.bridge/org.emerse.bridge.aspose.AsposeDoc.fromRtf(AsposeDoc.java:28)
	at org.emerse.hl7/org.emerse.hl7.commandline.Commandline.checkRtfBytes(Commandline.java:249)
	at org.emerse.hl7/org.emerse.hl7.commandline.Commandline.checkFile(Commandline.java:241)
	at org.emerse.hl7/org.emerse.hl7.commandline.Commandline.executeCommandline(Commandline.java:76)
	at org.emerse.hl7/org.emerse.hl7.commandline.Commandline.run(Commandline.java:49)
	at org.emerse.hl7/org.emerse.hl7.Main.main(Main.java:14)
Caused by: java.lang.IllegalArgumentException: Specified argument was out of the range of valid values.
Parameter name: firstColumn
	at com.aspose.words.zz3c.zzVQU(Unknown Source)
	at com.aspose.words.zz3c.zzYg0(Unknown Source)
	at com.aspose.words.zzZzm.zzZZA(Unknown Source)
	at com.aspose.words.zzZzm.zzXb6(Unknown Source)
	at com.aspose.words.zzZ6Z.zzXab(Unknown Source)
	at com.aspose.words.zzZ6Z.zzO1(Unknown Source)
	at com.aspose.words.zzVPS.zzXQW(Unknown Source)
	at com.aspose.words.zzVPS.visitTableEnd(Unknown Source)
	at com.aspose.words.Table.zzO1(Unknown Source)
	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
	at com.aspose.words.Table.accept(Unknown Source)
	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
	at com.aspose.words.Body.accept(Unknown Source)
	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
	at com.aspose.words.Section.accept(Unknown Source)
	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
	at com.aspose.words.Document.accept(Unknown Source)
	at com.aspose.words.zzVPS.zzXQW(Unknown Source)
	at com.aspose.words.Document.zzO1(Unknown Source)
	at com.aspose.words.Document.zzO1(Unknown Source)
	... 9 more

I have a few questions:

  1. Is this really an incorrectly formatted RTF? Like is the value really outside the valid range?
  2. Even if it’s a genuine error, TextEdit on Mac can render the document. Is it reasonable for Aspose to also render and convert the document to PDF and HTML?
  3. If not, can you describe the error in some detail, like what the value is, and what the valid values are? If we have a little bit of a technical understanding of the error we can take that to them and see if they can fix it on their end to not generate malformed RTFs.

problem-rtf-wrapped-in-zip.zip (8.7 KB)

Thank you!

Kellen

@mcclaink
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25270

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-25270) have been fixed in this Aspose.Words for .NET 23.9 update also available on NuGet.