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