OutlineItemCollection

OutlineItemCollection

Overview

OutlineItemCollection is a type in Aspose.PDF FOSS for Go.

OutlineItemCollection represents an outline entry and the collection of its children.

This type provides 23 methods for working with OutlineItemCollection objects in Go programs. Available methods include: Action, Add, All, At, Bold, Color, Count, Destination, Document, Insert, IsExpanded, Italic, and 11 additional methods. All public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.

Methods

SignatureDescription
Document()*DocumentDocument returns the document this collection is bound to.
Parent()*OutlineItemCollectionParent returns the parent entry, or nil for the root collection.
Count()intCount returns the number of direct children (placeholder until Task 5 adds the rest of the collection API).
Title()stringTitle returns the bookmark text.
SetTitle(s: string)SetTitle replaces the bookmark text.
Bold()boolBold corresponds to /F bit 2 in the outline item dict.
SetBold(b: bool)Sets the bold value.
Italic()boolItalic corresponds to /F bit 1.
SetItalic(b: bool)Sets the italic value.
Color()*ColorColor returns the RGB label color, or nil if /C is absent (default black).
SetColor(c: *Color)Sets the color value.
IsExpanded()boolIsExpanded controls the viewer’s initial expand/collapse state.
SetIsExpanded(b: bool)Sets the is expanded value.
Action()ActionAction returns the action attached via /A.
SetAction(a: Action)SetAction sets the /A action.
Destination()DestinationDestination returns the explicit view destination via /Dest, or nil if absent.
SetDestination(d: Destination)SetDestination sets the /Dest entry.
Add(child: *OutlineItemCollection)errorAdd appends child as the last child of this entry.
Insert(index: int, child: *OutlineItemCollection)errorInsert inserts child at the given 0-based index among this entry’s children.
Remove(child: *OutlineItemCollection)boolRemove detaches child if it’s a direct child.
RemoveAt(index: int)errorRemoveAt detaches the child at the given index.
At(index: int)*OutlineItemCollectionAt returns the child at the given 0-based index, or nil if out-of-range.
All()[]*OutlineItemCollectionAll returns a snapshot slice of direct children.

See Also