Add Table of Content in RadFlowDocument

4 Answers 105 Views
WordsProcessing
Muhammad
Top achievements
Rank 1
Iron
Muhammad asked on 19 Dec 2022, 09:23 AM

I'm using RadFlowDocument to edit a document (docx), this file is a combination of different docx file.

I have to add Table of content in this file. I saw this code but it is using RadDocument instead of RadFlowDocument class

RadDocument document = new RadDocument();
RadDocumentEditor editor = new RadDocumentEditor(new RadDocument());
editor.InsertField(new TableOfContentsField(), FieldDisplayMode.Result);

How can I add ToC using RadFlowDocument ?

Thanks

4 Answers, 1 is accepted

Sort by
1
Accepted
Dimitar
Telerik team
answered on 19 Dec 2022, 11:24 AM

Hi Muhammad,

This is still not supported, we have a feature request for it on our feedback portal: https://feedback.telerik.com/document-processing/1356020-wordsprocessing-table-of-contents-toc-field.

We are already working on this and it will be available in the next official release. 

Let me know if I can assist you further.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Muhammad
Top achievements
Rank 1
Iron
answered on 19 Dec 2022, 11:47 AM

Thanks for your reply.

Is it possible if after saving the document using RadFlowDocument, I open it in RadDocument and add the Table of content ? since I think RadDocument does support TOC.

If possible will this have any impact on the design of the document ?

Thanks,

0
Dimitar
Telerik team
answered on 19 Dec 2022, 12:18 PM

Hi Muhammad,

Yes, this is possible you need to use one of the formats that are supported by both suites. For example the Docx format. Once the document is ready,  export it to a file or stream then import it to RadDocument and add the TOC, and export it again. More information about the import-export is available in the following articles: 

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Muhammad
Top achievements
Rank 1
Iron
answered on 22 Dec 2022, 12:54 PM

Could you please tell me what is the official date for the next release ?

Thanks

Dimitar
Telerik team
commented on 22 Dec 2022, 01:24 PM

Hi Muhammad, 

The release is scheduled for the middle of January. I can't provide an exact date at the moment.

Regards,

Dimitar

Muhammad
Top achievements
Rank 1
Iron
commented on 22 Dec 2022, 01:45 PM | edited

Thats great.... Are you sure that generating TOC with RadFlowDocument will be a part of the coming release ? because I checked the portal link and it says unplanned.
Dimitar
Telerik team
commented on 23 Dec 2022, 09:49 AM

Hi Muhammad,

Yes I am sure, I send your feedback to the team and they will update the item status. 

Let me know if I can assist you further.

 

Muhammad
Top achievements
Rank 1
Iron
commented on 26 Dec 2022, 08:50 AM

Thanks for the update.
Tags
WordsProcessing
Asked by
Muhammad
Top achievements
Rank 1
Iron
Answers by
Dimitar
Telerik team
Muhammad
Top achievements
Rank 1
Iron
Share this question
or