# ViewDestination Class

> Represents a particular view of a page in a document.

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2a
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ViewDestination
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/llms.txt

```java
class ViewDestination
```

**Namespace:** `com::datalogics::PDFL`

## Description

Represents a particular view of a page in a document. A destination describes a place in the PDF document where the user will be taken in response to clicking a hyperlink. The destination defines where a bookmark or hyperlink points to.

The ViewDestination contains a reference to a page, a place (rectangle) on that page, and information specifying how to adjust the view to fit the window's size and shape.

**Referenced by:** [`Bookmark`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Bookmark.md), [`GoToAction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/GoToAction.md), [`LinkAnnotation`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/LinkAnnotation.md), [`ViewDestination`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ViewDestination.md)

**Uses types:** [`Document`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Document.md), [`PDFArray`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/PDFArray.md), [`Rect`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Rect.md), [`ViewDestination`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ViewDestination.md)

## Constructors

### ViewDestination

```java
com.datalogics.PDFL.ViewDestination.ViewDestination(Document doc, int pageNum, String fitType, Rect r, double zoom)
```

*constructor*

**Parameters**

- `doc` ([`Document`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Document.md)): Containing document
- `pageNum` (`int`): Target page number
- `fitType` (`String`): Fit Type must be: "XYZ", "Fit", "FitH", "FitV", "FitR", "FitB", "FitBH", or "FitBV".
- `r` ([`Rect`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Rect.md)): Target rectangle
- `zoom` (`double`): Zoom level

General purpose constructor: construct with all elements

## Fields

### CViewDestination_NullValue

```java
static final double com.datalogics.PDFL.ViewDestination.CViewDestination_NullValue
```

*static*

Constant used for "null" values in destination rectangles or zoom.

### NULL_VALUE

```java
static final double com.datalogics.PDFL.ViewDestination.NULL_VALUE
```

*static*

### NullValue

```java
static final double com.datalogics.PDFL.ViewDestination.NullValue
```

*static*

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.ViewDestination.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.ViewDestination.delete()
```

**Returns:** `synchronized void`

### equals

```java
boolean com.datalogics.PDFL.ViewDestination.equals(Object rhs)
```

**Parameters**

- `rhs` (`Object`)

**Returns:** `boolean`

### finalize

```java
void com.datalogics.PDFL.ViewDestination.finalize()
```

*protected*

**Returns:** `void`

### getDestRect

```java
Rect com.datalogics.PDFL.ViewDestination.getDestRect()
```

**Returns:** [`Rect`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Rect.md)

The destination rectangle.

### getFitType

```java
String com.datalogics.PDFL.ViewDestination.getFitType()
```

**Returns:** `String`

The fit type.

### getPDFArray

```java
PDFArray com.datalogics.PDFL.ViewDestination.getPDFArray()
```

**Returns:** [`PDFArray`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/PDFArray.md)

Retrieve the PDFObject representation of this object

### getPageNumber

```java
int com.datalogics.PDFL.ViewDestination.getPageNumber()
```

**Returns:** `int`

The page number of the destination

### getZoom

```java
double com.datalogics.PDFL.ViewDestination.getZoom()
```

**Returns:** `double`

The zoom factor for the destination.

### setDestRect

```java
void com.datalogics.PDFL.ViewDestination.setDestRect(Rect ViewDestRect)
```

**Parameters**

- `ViewDestRect` ([`Rect`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Rect.md))

**Returns:** `void`

Set the destination rectangle of the view.

### setFitType

```java
void com.datalogics.PDFL.ViewDestination.setFitType(String ViewDestFitType)
```

**Parameters**

- `ViewDestFitType` (`String`)

**Returns:** `void`

Set the fit type for the view

### setPageNumber

```java
void com.datalogics.PDFL.ViewDestination.setPageNumber(int ViewDestPageNum)
```

**Parameters**

- `ViewDestPageNum` (`int`)

**Returns:** `void`

Set the page number of the destination starting at 0

### setZoom

```java
void com.datalogics.PDFL.ViewDestination.setZoom(double ViewDestZoomFactor)
```

**Parameters**

- `ViewDestZoomFactor` (`double`)

**Returns:** `void`

Set the zoom factor for the destination.

### toString

```java
String com.datalogics.PDFL.ViewDestination.toString()
```

**Returns:** `String`
