跳到主要内容

TocPr

目录属性。

类型

对象

属性

名称类型描述
BuildFromTocBuildFromPr指定是从大纲级别还是指定样式生成目录。
FormatAsLinksboolean指定是否将目录格式化为链接。
LeaderTypeTocLeader目录中的前导符类型。
RightAlgnboolean指定是否在目录中右对齐页码。
ShowPageNumsboolean指定是否在目录中显示页码。
TocStyleTocStyle目录样式类型。

示例

This example adds a table of contents with the specified properties to the document.

// How to create a table of contents properties.

// Add a table of contents from the properties.

let tocPr = {
"ShowPageNums": true,
"RightAlgn": true,
"LeaderType": "dot",
"FormatAsLinks": true,
"BuildFrom": {
"OutlineLvls": 9
},
"TocStyle": "standard"
};
doc.AddTableOfContents(tocPr);