# OutlineNode

## Content

[**DsPdfJS API v9.1.3**](../README)

***

[DsPdfJS API](../globals) / OutlineNode

# Class: OutlineNode

Defines the outline node within PDF document.

## Extends

- [`ObjectBase`](ObjectBase)

## Constructors

### Constructor

> **new OutlineNode**(`om`, `title?`, `action?`, `expanded?`): `OutlineNode`

Initialize a new instance of the OutlineNode class.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

[ObjectManager](ObjectManager) that controls the lifetime of the OutlineNode.

##### title?

`string`

The title of OutlineNode.

##### action?

The action which should be performed or destination defining the new document view.

[`DestinationProperties`](../type-aliases/DestinationProperties) | [`ActionProperties`](../type-aliases/ActionProperties) | [`ActionBase`](ActionBase) | [`DestinationBase`](DestinationBase)

##### expanded?

`boolean`

Indicates whether the node should be expanded.

#### Returns

`OutlineNode`

#### Overrides

`ObjectBase.constructor`

### Constructor

> **new OutlineNode**(`title?`, `action?`, `expanded?`): `OutlineNode`

Initialize a new instance of the OutlineNode class.

#### Parameters

##### title?

`string`

The title of OutlineNode.

##### action?

The action which should be performed or destination defining the new document view.

[`DestinationProperties`](../type-aliases/DestinationProperties) | [`ActionProperties`](../type-aliases/ActionProperties) | [`ActionBase`](ActionBase) | [`DestinationBase`](DestinationBase)

##### expanded?

`boolean`

Indicates whether the node should be expanded.

#### Returns

`OutlineNode`

#### Overrides

`ObjectBase.constructor`

## Accessors

### action

#### Get Signature

> **get** **action**(): [`ActionBase`](ActionBase) \| `null`

Gets or sets the [ActionBase](ActionBase) to be performed when this OutlineNode is activated.
If both 'dest' and 'action' are specified,
the viewer application will determine the behavior, which may be unpredictable.
For consistent results, specify only one.

##### Returns

[`ActionBase`](ActionBase) \| `null`

#### Set Signature

> **set** **action**(`value`): `void`

Gets or sets the [ActionBase](ActionBase) to be performed when this OutlineNode is activated.
If both 'dest' and 'action' are specified,
the viewer application will determine the behavior, which may be unpredictable.
For consistent results, specify only one.

##### Parameters

###### value

[`ActionProperties`](../type-aliases/ActionProperties) | [`ActionBase`](ActionBase) | `null`

##### Returns

`void`

***

### children

#### Get Signature

> **get** **children**(): [`OutlineNodeCollection`](OutlineNodeCollection)

Gets the [OutlineNodeCollection](OutlineNodeCollection) collection containing child nodes.

##### Returns

[`OutlineNodeCollection`](OutlineNodeCollection)

***

### dest

#### Get Signature

> **get** **dest**(): [`DestinationBase`](DestinationBase) \| `null`

Gets or sets the [DestinationBase](DestinationBase) to be displayed when this OutlineNode is activated.
If both 'dest' and 'action' are specified,
the viewer application will determine the behavior, which may be unpredictable.
For consistent results, specify only one.

##### Returns

[`DestinationBase`](DestinationBase) \| `null`

#### Set Signature

> **set** **dest**(`value`): `void`

Gets or sets the [DestinationBase](DestinationBase) to be displayed when this OutlineNode is activated.
If both 'dest' and 'action' are specified,
the viewer application will determine the behavior, which may be unpredictable.
For consistent results, specify only one.

##### Parameters

###### value

[`DestinationProperties`](../type-aliases/DestinationProperties) | [`DestinationBase`](DestinationBase) | `null`

##### Returns

`void`

***

### doc

#### Get Signature

> **get** **doc**(): [`PdfDocument`](PdfDocument) \| `null`

Gets the [PdfDocument](PdfDocument) owning this object.

##### Returns

[`PdfDocument`](PdfDocument) \| `null`

***

### expanded

#### Get Signature

> **get** **expanded**(): `boolean`

Gets or sets a value indicating whether this OutlineNode expanded and its child nodes are visible.

##### Returns

`boolean`

#### Set Signature

> **set** **expanded**(`value`): `void`

Gets or sets a value indicating whether this OutlineNode expanded and its child nodes are visible.

##### Parameters

###### value

`boolean`

##### Returns

`void`

***

### hasChildren

#### Get Signature

> **get** **hasChildren**(): `boolean`

Gets a value indicating whether [children](#children) collection is not empty.

##### Returns

`boolean`

***

### id

#### Get Signature

> **get** **id**(): `number`

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`ObjectBase`](ObjectBase).[`id`](ObjectBase#id)

***

### om

#### Get Signature

> **get** **om**(): [`ObjectManager`](ObjectManager)

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`ObjectBase`](ObjectBase).[`om`](ObjectBase#om)

***

### owner

#### Get Signature

> **get** **owner**(): [`OutlineNodeCollection`](OutlineNodeCollection) \| `null`

Gets the [OutlineNodeCollection](OutlineNodeCollection) collection containing this object.

##### Returns

[`OutlineNodeCollection`](OutlineNodeCollection) \| `null`

***

### parent

#### Get Signature

> **get** **parent**(): `OutlineNode` \| `null`

Gets the parent OutlineNode.

##### Returns

`OutlineNode` \| `null`

***

### textColor

#### Get Signature

> **get** **textColor**(): [`Color`](../type-aliases/Color)

Gets or sets the text color of the outline node.

##### Returns

[`Color`](../type-aliases/Color)

#### Set Signature

> **set** **textColor**(`value`): `void`

Gets or sets the text color of the outline node.

##### Parameters

###### value

[`Color`](../type-aliases/Color)

##### Returns

`void`

***

### textStyle

#### Get Signature

> **get** **textStyle**(): [`OutlineNodeFontStyle`](../enumerations/OutlineNodeFontStyle)

Gets or sets the text style of the outline node.

##### Returns

[`OutlineNodeFontStyle`](../enumerations/OutlineNodeFontStyle)

#### Set Signature

> **set** **textStyle**(`value`): `void`

Gets or sets the text style of the outline node.

##### Parameters

###### value

[`OutlineNodeFontStyle`](../enumerations/OutlineNodeFontStyle)

##### Returns

`void`

***

### title

#### Get Signature

> **get** **title**(): `string` \| `null`

Gets or sets the title of the outline node.

##### Returns

`string` \| `null`

#### Set Signature

> **set** **title**(`value`): `void`

Gets or sets the title of the outline node.

##### Parameters

###### value

`string` | `null`

##### Returns

`void`

## Methods

### free()

> **free**(): `void`

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`free`](ObjectBase#free)

***

### rebind()

> **rebind**(`omTo`): `void`

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`rebind`](ObjectBase#rebind)
