# DestinationRef

## Content

# Class: DestinationRef

Defines destination as reference to another destination, referenced destination
can be in Dests dictionary of PDF document or in Dests subtree of Name Tree.

## Extends

- [`DestinationBase`](DestinationBase)

## Constructors

### Constructor

```ts
new DestinationRef(
   om, 
   name, 
   nameTree?): DestinationRef;
```

Initializes a new instance of the DestinationRef class.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

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

##### name

`string`

The name of referenced destination.

##### nameTree?

`boolean`

Specifies where referenced destination is in Dests dictionary of document or in Dests subtree of Name Tree.

#### Returns

`DestinationRef`

#### Overrides

```ts
DestinationBase.constructor
```

### Constructor

```ts
new DestinationRef(name, nameTree?): DestinationRef;
```

Initializes a new instance of the DestinationRef class.

#### Parameters

##### name

`string`

The name of referenced destination.

##### nameTree?

`boolean`

Specifies where referenced destination is in Dests dictionary of document or in Dests subtree of Name Tree.

#### Returns

`DestinationRef`

#### Overrides

```ts
DestinationBase.constructor
```

## Accessors

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

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

***

### name

#### Get Signature

```ts
get name(): string;
```

Gets the name of referenced destination in the Dests dictionary of PDF document.

##### Returns

`string`

***

### nameTree

#### Get Signature

```ts
get nameTree(): boolean;
```

Gets a value indicating whether this DestinationRef references
destination in Dests dictionary of PDF document or in Dests subtree of document's Name Tree.

##### Returns

`boolean`

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

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

## Methods

### free()

```ts
free(): void;
```

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

#### Returns

`void`

#### Inherited from

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

***

### rebind()

```ts
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

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