OutlineItemCollection

OutlineItemCollection

概述

OutlineItemCollection 是 Aspose.PDF FOSS 中用于 .NET 的类。继承自:OutlineItem,System.Collections.Generic.IEnumerable<OutlineItemCollection>。

文档大纲(书签树)。

此类提供 15 个方法,用于在 .NET 程序中处理 OutlineItemCollection 对象。可用的方法包括:Add,Clear,Contains,CopyTo,Delete,GetEnumerator,Insert,OutlineItem,OutlineItemCollection,Remove。在安装 Aspose.PDF FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Action,Bold,Children,Color,Count,Destination,以及其他 18 项。

属性

名称类型访问描述
Countint读取子大纲项目的数量。
FirstOutlineItemCollection?读取第一个子大纲项目,如果没有则为 null。
LastOutlineItemCollection?读取最后一个子大纲项,如果没有则为 null。
NextOutlineItemCollection?读取下一个兄弟大纲项,如果这是最后一个兄弟则为 null。
PrevOutlineItemCollection?读取上一个兄弟大纲项,如果这是第一个兄弟则为 null。
HasNextbool读取当此项目有下一个兄弟节点时为真。
Titlestring读写书签标题。
ActionAspose.Pdf.Annotations.PdfAction?读写与此大纲项关联的操作(如果有)。
DestinationAspose.Pdf.Annotations.IAppointment?读写此大纲项目的目标位置。
Boldbool读写书签是否以粗体显示。
Italicbool读写书签是否以斜体显示。
ColorSystem.Drawing.Color读写书签颜色。
Openbool读写书签是否已展开。
IsReadOnlybool读取集合是否为只读。
IsSynchronizedbool读取集合是否为线程安全。
SyncRootobject读取针对 IsSynchronized 的同步根;返回此集合。
Levelint读取此书签在大纲树中的深度(顶层 = 0)。
ParentOutlines?读取所属的大纲树;如果此项目尚未附加,则为 null。
VisibleCountint读取遵循 PDF /Count 语义的有符号可见后代计数:当此节点展开时出现的项目数量(直接子项加上展开后代的可见计数),节点关闭时取负值。
IsOpenbool读写此大纲项是否在初始时展开(打开)。
IsBoldbool读写大纲项标题是否以粗体显示。
IsItalicbool读写大纲项标题是否以斜体显示。
DestinationPageNumberint读取目标页面编号(基于 1 的计数),如果未设置或不是页面目标,则为 0。
ChildrenIReadOnlyList<OutlineItem>读取子大纲项。

方法

签名描述
OutlineItemCollection()构造一个空的大纲项。
OutlineItemCollection(outlines: OutlineCollection?)构建一个绑定到现有大纲集合的纲要项(相当于 new OutlineItemCollection(doc.Outlines))。
GetEnumerator()遍历子大纲项。
Add(outline: OutlineItemCollection)将大纲项添加为此项的子项。
Clear()移除所有子大纲项。
Contains(item: OutlineItemCollection)提供的项目是否是此项目的直接子项。
CopyTo(array: OutlineItemCollection[], index: int)将子项复制到数组中,从指定索引开始。
Delete()从其父项(顶层 OutlineCollection 或包含项)中移除此大纲项,匹配引用 API,其中 outlines[i].Delete() 会删除该书签。
Delete(name: string)移除标题匹配 name 的第一个子项。
Insert(index: int, outline: OutlineItemCollection)在提供的基于 1 的索引处插入一个大纲项。
Remove(item: OutlineItemCollection)移除提供的子项并报告它是否存在。
Remove(index: int)移除位于提供的基于 1 的索引处的子项。
OutlineItem()创建一个新的大纲项,可添加到 OutlineCollection 或另一个 OutlineItem 中。
Add(child: OutlineItem)追加一个子大纲项。
Insert(index: int, child: OutlineItem)在基于 1 的位置插入子大纲项。

另请参阅

 中文