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