I’ve noticed that Aspose.Words does not seem to support table of contents entries in RTF format (specified as \tc)
It does seem to be supported if Aspose loads from a .doc file. Attached is a sample .rtf file. Below is the code. If you open up the resulting word document, you will notice that the \tc entries have been stripped. If you update the table of contents, nothing will show up.
void Test()
{
// set the license…
// load the rtf document
Document doc = new Document(@"c:\TCEntryTest.rtf");
// save the file as a .doc
doc.Save(@"c:\TCEntryTest.doc", SaveFormat.Doc);
}
For what its worth, here is the relevant documentation from the RTF1 spec:
TABLE OF CONTENTS ENTRIES
=========================
The table of contents entry group begins with the control word \tc. It is followed by the text of the table of contents entry and other optional control words that further define the group.
As with index entries, text that is not formatted as hidden with the \v character-formatting control word is put into the document. The following control words can also be used in this group:
Control Word Meaning
------------ -------
\tcf The type of table being compiled; is mapped
by existing Microsoft software to a letter
between A and Z (the default is 67, which maps to
C and is used for tables of contents).
Hi
Thanks for your request. I managed to reproduce the problem and created new issue #7076 in our defect database. I will notify you as soon as it is fixed.
Best regards.
Thanks for your request. Unfortunately, the issue is still unresolved. I added your request into my monthly report, this will push the issue up in the priority list. We will let you know once the issue is resolved. My apologizes for inconvenience.
Best regards.
Thanks for your inquiry. Currently, I cannot promise you any exact date. We will try to resolve the problem in one of the upcoming releases.
Best regards.
Thanks for your inquiry. The issue is already resolved in the current codebase. The fix will be included into the next version of Aspose.Words, which comes out in a week or so. We will notify you.
Best regards.
Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Also, as I can see the problem occurs only upon rendering. If save the output document in DOC TOC looks fine.
Best regards,
I tried to save in doc format and it was still corrupted.
Could you send me a code example?
Also, if we decide to purchase (the priority support) with the understanding that this will be corrected, will this be considered a minor issue that could be quickly fixed?
Thanks for your inquiry. I used the following code:
Document doc = new Document(@"Test001\2006_2006spd.rtf");
doc.UpdateFields();
doc.UpdatePageLayout();
doc.Save(@"Test001\out.doc");
I see that if update TOC again in the output document using MS Word, TOC looks improperly. I added this information to the defect description.
Best regards,
If we decide to purchase (the priority support) with the understanding
that this will be corrected, will this be considered a minor issue that
could be quickly fixed? If so, what is the timeline?
Thanks for your inquiry. Unfortunately, it is difficult to tell you how complex the issue is and how long it will take to fix the problem. I raised the priority of this issue. We will let you know once there is some progress with this issue.
Best regards,