An Outline is a tree type doubly linked list data structure providing an interactive view of the Document. Each level of the tree may contain child items that also form a doubly linked list. Navigating the tree is done through the first, last, next and prev properties of an Outline instance. See the Bookmark Cookbook for examples.
class Outline {
readonly prev?: Outline
readonly next?: Outline
readonly first?: Outline
readonly last?: Outline
destination: Destination
action: Action
title: string
textFormat: number
textColor: Color
createChild(name: string, value: Destination): Outline
createNext(name: string, value: Destination | Action): Outline
insertItem(item: Object): void
getParent(): Outline
erase(): void
}
NoPoDoFo does not support a default constructor for creating Outline objects. In order to begin an outline you must start at the root. Creating a root is accomplished by Document.getOutline, subsequent nodes are created using the createChild and createNext methods.
Get the previous outline item or null
Get the next outline item or null
Get the first outline item that is a child of this item
Get the last outline item that is a child of this item
Outline Destination accessor, get and set the destination of the outline item
Outline Action accessor, get and set the action of the outline item
Get and set the title of the outline item
Get and set the format of the title of the outline item
Get and set the text color as Color of the title of the outline item
createChild(name: string, value: Destination): Outline
Create a child of this outlien item
createNext(name: string, value: Destination | Action): Outline
Create the next item in the doubly linked list
insertItem(item: Object): void
Insert a new outline item as a child of this item. The new item can not be in the same tree as this item as that would break the tree structure.
getParent(): Outline
Get the parent Outline item of this item
erase(): void
Erase this item and children of this item.