# DestinationXYZ

## Content

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

***

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

# Class: DestinationXYZ

Display the page designated by [Destination#page](Destination#page), with the coordinates (left, top) positioned at the upper-left corner
of the window and the contents of the page magnified by the factor zoom.
A null value for any of the parameters left, top, or zoom specifies that the current value
of that parameter is to be retained unchanged. A zoom value of 0 has the same meaning as a null value.

## Extends

- [`Destination`](Destination)

## Constructors

### Constructor

> **new DestinationXYZ**(`om`, `pageIndex`, `left?`, `pdfTop?`, `zoom?`): `DestinationXYZ`

Initializes a new instance of the DestinationXYZ class.

Note that all Y coordinates should be specified relative to the bottom of the page.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

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

##### pageIndex

`number`

The target page index.

##### left?

`number`

The left coordinate of the document window.

##### pdfTop?

`number`

The top coordinate of the document window relative to the bottom of the page.

##### zoom?

`number`

The zoom factor of the document window.

#### Returns

`DestinationXYZ`

#### Overrides

`Destination.constructor`

### Constructor

> **new DestinationXYZ**(`pageIndex`, `left?`, `pdfTop?`, `zoom?`): `DestinationXYZ`

Initializes a new instance of the DestinationXYZ class.

Note that all Y coordinates should be specified relative to the bottom of the page.

#### Parameters

##### pageIndex

`number`

The target page index.

##### left?

`number`

The left coordinate of the document window.

##### pdfTop?

`number`

The top coordinate of the document window relative to the bottom of the page.

##### zoom?

`number`

The zoom factor of the document window.

#### Returns

`DestinationXYZ`

#### Overrides

`Destination.constructor`

### Constructor

> **new DestinationXYZ**(`om`, `page`, `left?`, `top?`, `zoom?`): `DestinationXYZ`

Initializes a new instance of the DestinationXYZ class.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

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

##### page

[`PdfPage`](PdfPage)

The target [PdfPage](PdfPage).

##### left?

`number`

The left coordinate of the document window.

##### top?

`number`

The top coordinate of the document window relative to the top of the page.

##### zoom?

`number`

The zoom factor of the document window.

#### Returns

`DestinationXYZ`

#### Overrides

`Destination.constructor`

### Constructor

> **new DestinationXYZ**(`page`, `left?`, `top?`, `zoom?`): `DestinationXYZ`

Initializes a new instance of the DestinationXYZ class.

#### Parameters

##### page

[`PdfPage`](PdfPage)

The target [PdfPage](PdfPage).

##### left?

`number`

The left coordinate of the document window.

##### top?

`number`

The top coordinate of the document window relative to the top of the page.

##### zoom?

`number`

The zoom factor of the document window.

#### Returns

`DestinationXYZ`

#### Overrides

`Destination.constructor`

## Accessors

### id

#### Get Signature

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

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

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

***

### left

#### Get Signature

> **get** **left**(): `number` \| `null`

Gets the left coordinate of the document window, if null then unchanged.

##### Returns

`number` \| `null`

***

### om

#### Get Signature

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

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

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

***

### page

#### Get Signature

> **get** **page**(): [`PdfPage`](PdfPage) \| `null`

Gets this destination's target [PdfPage](PdfPage) object.
Returns null if the target page was specified by index.

##### Returns

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

#### Inherited from

[`Destination`](Destination).[`page`](Destination#page)

***

### pageIndex

#### Get Signature

> **get** **pageIndex**(): `number` \| `null`

Gets the index of this destination's target page.
Returns null if the target page was specified as a [PdfPage](PdfPage) object.

Note that if this property is not null, then any Y coordinate is
relative to the bottom left corner (see [Destination](Destination) description for details).

##### Returns

`number` \| `null`

#### Inherited from

[`Destination`](Destination).[`pageIndex`](Destination#pageindex)

***

### pdfTop

#### Get Signature

> **get** **pdfTop**(): `number` \| `null`

Gets the top coordinate of the document window relative to the bottom left corner,
unchanged if null.

##### Returns

`number` \| `null`

***

### top

#### Get Signature

> **get** **top**(): `number` \| `null`

Gets the top coordinate of the document window, if null then unchanged.

If the target page of this destination was specified as an index ([Destination#pageIndex](Destination#pageindex)),
then this property returns the Y coordinate relative to the page bottom.
If the target page was specified as a page object (see [Destination#page](Destination#page)),
then this property returns the Y coordinate relative to the page top.
See [Destination](Destination) description for details.

##### Returns

`number` \| `null`

***

### zoom

#### Get Signature

> **get** **zoom**(): `number` \| `null`

Gets the zoom factor of the document window, unchanged if null or zero.

##### Returns

`number` \| `null`

## Methods

### free()

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

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

#### Returns

`void`

#### Inherited from

[`Destination`](Destination).[`free`](Destination#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

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