I am very sad to hear about your frustration, but I totally understand it. I will try to justify our position a bit, and then I will try to propose a workaround for the case.
As we are working with limited resource, we are trying to prioritize the most important items and work on them first. One of the most important factors, of course, is the customer demand, and while the demand for the support of TOC field is relatively high, we consider it currently not sufficient to justify the complexity of the implementation. What you say is indeed absolutely true - all of the needed PDF elements (like texts and hyperlink annotations) are already supported, and one of the hardest points of the implementation is that page numbers for the different elements included should be computed. While this is partially implemented in the PDF export (which can do basic layout and determine the position of the elements on the pages), the concept could not be easily extracted and applied in the general case.
We can consider partial implementation of the feature by skipping the page numbers, as you suggested, but we believe that this is one of the main features of a table of content, and could cause more frustration then benefits - as sometimes customers are investing significant time to implement a solution, believing that a feature is supported, only to find out at the end that it's not.
One possible workaround that comes to my mind is to use the classes associated with RadRichTextBox for WPF
. The same set
of format providers is supported, as well as TOC field update
. You can use the similar RadDocumentEditor
class to insert and update the field. The downsides of the approach would be:
- Some more references
to Telerik assemblies should be added, as well as to some WPF-related .NET Framework assemblies (e.g. PresentationCore and PresentationFramework).
- The code handling the document models and import/export should be executed in an STA thread
(such could be started from your web app's threads, which are most probably MTA).
- I just checked the implementation with the team (the documentation article update is currently in progress, so the information should be present online soon), and the only switch not supported among the ones used in the sample code is "\z".
Let us know in case you need further assistance with any of the approaches.
Get quickly onboarded and successful
with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.