OutlineItemCollection

OutlineItemCollection

概述

OutlineItemCollection 是 Aspose.PDF FOSS for Go 中的一个类型。

OutlineItemCollection 表示一个大纲条目以及其子条目的集合。

此类型为在 Go 程序中处理 OutlineItemCollection 对象提供了 23 个方法。可用的方法包括:Action、Add、All、At、Bold、Color、Count、Destination、Document、Insert、IsExpanded、Italic,以及另外 11 个方法。安装 Aspose.PDF FOSS for Go 包后,所有公共成员均可供任何 Go 应用程序访问。

方法

签名描述
Document() → *DocumentDocument 返回此集合绑定的文档。
Parent() → *OutlineItemCollectionParent 返回父条目,如果是根集合则返回 nil。
Count() → intCount 返回直接子项的数量(占位符,直到任务 5 添加集合其余部分 API)。
Title() → stringTitle 返回书签文本。
SetTitle(s: string)SetTitle 替换书签文本。
Bold() → bool粗体对应大纲项字典中的 /F 位 2。
SetBold(b: bool)设置粗体值。
Italic() → bool斜体对应 /F 位 1。
SetItalic(b: bool)设置斜体值。
Color() → *ColorColor 返回 RGB 标签颜色,如果缺少 /C 则返回 nil(默认黑色)。
SetColor(c: *Color)设置颜色值。
IsExpanded() → boolIsExpanded 控制查看器的初始展开/折叠状态。
SetIsExpanded(b: bool)设置 is expanded 值。
Action() → ActionAction 返回通过 /A 附加的操作。
SetAction(a: Action)SetAction 设置 /A 操作。
Destination() → DestinationDestination 通过 /Dest 返回显式视图目标,如果不存在则返回 nil。
SetDestination(d: Destination)SetDestination 设置 /Dest 条目。
Add(child: *OutlineItemCollection) → errorAdd 将 child 追加为此条目的最后一个子项。
Insert(index: int, child: *OutlineItemCollection) → errorInsert 在此条目的子节点中,在给定的 0 基索引处插入子节点。
Remove(child: *OutlineItemCollection) → boolRemove 如果子项是直接子项,则将其分离。
RemoveAt(index: int) → errorRemoveAt 在给定的索引处分离子项。
At(index: int) → *OutlineItemCollectionAt 返回给定 0 基索引处的子项,如果超出范围则返回 nil。
All() → []*OutlineItemCollectionAll 返回直接子项的快照切片。

另请参阅

 中文