A TableOfContents object defines the position and the properties of a table of contents. A table of contents can be automatically genarated from the structure levels defined for each paragraph in the document. A document can contain multiple tables of contents consisting of paragraphs with different levels. To generate a new table of contents the TableOfContentsCollection.add method can be used.

Syntax

TableOfContents

Introduced: X19.

Methods

Method Description
getHasLinks Gets value specifying whether each entry in the table of contents is a DocumentLink with a corresponding DocumentTarget.
getHasPageNumbers Gets a value specifying whether the table of contents contains page numbers.
getHasRightAlignedPageNumbers Gets a value specifying whether the page numbers in the table of contents are right-aligned.
getHighlightColor Gets the highlight color for the table of contents.
getHighlightMode Gets a value indicating whether the table of contents is highlighted.
getID Gets an identifier for a table of contents.
getLength Gets the number of characters which belong to the table of contents.
getMaximumStructureLevel Gets the maximum structure level for this table of contents.
getMinimumStructureLevel Gets the minimum structure level for this table of contents.
getName Gets a name for the table of contents.
getNumber Gets the number of the table of contents in the text.
getStart Gets the index (one-based) of the first character which belongs to the table of contents.
getText Gets the text of the table of contents.
getTitle Gets a title for the table of contents.
save Saves the TableOfContents in a certain format and sends the result back asynchronously by calling a given callback function.
scrollTo Sets the current input position to the beginning of a table of contents and scrolls it into the visible part of the document.
setHasLinks Sets a value specifying whether each entry in the table of contents is a DocumentLink with a corresponding DocumentTarget.
setHasPageNumbers Sets a value specifying whether the table of contents contains page numbers.
setHasRightAlignedPageNumbers Sets a value specifying whether the page numbers in the table of contents are right-aligned.
setHighlightColor Sets the highlight color for the table of contents.
setHighlightMode Sets a value indicating whether the table of contents is highlighted.
setID Sets an identifier for the table of contents.
setMaximumStructureLevel Sets the maximum structure level for this table of contents.
setMinimumStructureLevel Sets the minimum structure level for this table of contents.
setName Sets a name for the table of contents.
setTitle Sets a title for the table of contents.
update Updates the content and the page numbers of the table of contents.