TocBuildFromPr

type TocBuildFromPr = object

Description

Table of contents properties which specify whether to generate the table of contents from the outline levels or the specified styles.

Properties

OutlineLvlsnumberdefault: 9

Maximum number of levels in the table of contents.

StylesLvlsTocStyleLvl[]default: null

Style levels (for example, [{Name: "Heading 1", Lvl: 2}, {Name: "Heading 2", Lvl: 3}]).If StylesLvls.length > 0, then the OutlineLvls property will be ignored.

Try It

var oTocBuildFromPr = {"OutlineLvls": 9};
var oTocPr = {"ShowPageNums": true, "RightAlgn": true, "LeaderType": "dot", "FormatAsLinks": true, "BuildFrom": oTocBuildFromPr, "TocStyle": "standard"};
oDocument.AddTableOfContents(oTocPr);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).