OutlineItemCollection

OutlineItemCollection

Overview

OutlineItemCollection is a class in Aspose.PDF FOSS for .NET. Inherits from: OutlineItem, System.Collections.Generic.IEnumerable<OutlineItemCollection>.

A single outline item that may have child items (bookmarks/TOC entries).

This class provides 13 methods for working with OutlineItemCollection objects in .NET programs. Available methods include: Add, Clear, Contains, CopyTo, Delete, GetEnumerator, Insert, OutlineItem, OutlineItemCollection, Remove. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Action, Bold, Children, Color, Count, Destination, and 18 more.

Properties

NameTypeAccessDescription
CountintReadNumber of child outline items.
FirstOutlineItemCollection?ReadThe first child outline item, or null if none.
LastOutlineItemCollection?ReadThe last child outline item, or null if none.
NextOutlineItemCollection?ReadThe next sibling outline item, or null if this is the last sibling.
PrevOutlineItemCollection?ReadThe previous sibling outline item, or null if this is the first sibling.
HasNextboolReadTrue when this item has a next sibling.
TitlestringRead/WriteThe bookmark title.
ActionAspose.Pdf.Annotations.PdfAction?Read/WriteThe action associated with this outline item, if any.
DestinationAspose.Pdf.Annotations.IAppointment?Read/WriteThe destination of this outline item.
BoldboolRead/WriteWhether the bookmark is rendered in bold.
ItalicboolRead/WriteWhether the bookmark is rendered in italic.
ColorSystem.Drawing.ColorRead/WriteBookmark colour.
OpenboolRead/WriteWhether the bookmark is expanded.
IsReadOnlyboolReadWhether the collection is read-only.
IsSynchronizedboolReadWhether the collection is thread-safe.
SyncRootobjectReadSynchronization root for IsSynchronized; returns this collection.
LevelintReadDepth of this bookmark in the outline tree (top-level = 0).
ParentOutlines?ReadThe owning outline tree, or null when this item is not yet attached.
VisibleCountintReadNumber of bookmarks that are visible (counts /Count entries recursively).
IsOpenboolRead/WriteWhether this outline item is initially open (expanded).
IsBoldboolRead/WriteWhether the outline item title is displayed in bold.
IsItalicboolRead/WriteWhether the outline item title is displayed in italic.
DestinationPageNumberintReadThe destination page number (1-based), or 0 if not set or not a page destination.
ChildrenIReadOnlyList<OutlineItem>ReadChild outline items.

Methods

SignatureDescription
OutlineItemCollection()Construct an empty outline item.
OutlineItemCollection(outlines: OutlineCollection?)Construct an outline item bound to an existing outline collection (mirrors new OutlineItemCollection(doc.Outlines)).
GetEnumerator()Iterates over child outline items.
Add(outline: OutlineItemCollection)Add an outline item as a child of this one.
Clear()Remove every child outline item.
Contains(item: OutlineItemCollection)Whether the supplied item is a direct child of this one.
CopyTo(array: OutlineItemCollection[], index: int)Copy children into array starting at index.
Delete()Remove every child outline item (alias for Clear).
Delete(name: string)Remove the first child whose title matches name.
Insert(index: int, outline: OutlineItemCollection)Insert an outline item at the supplied 1-based index.
Remove(item: OutlineItemCollection)Remove the supplied child and report whether it was present.
Remove(index: int)Remove the child at the supplied 1-based index.
OutlineItem()Create a new outline item that can be added to an OutlineCollection or another OutlineItem.

See Also