# GoToAction Class

> A go-to action can be executed in a PDF document.

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

```java
class GoToAction : Action
```

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

**Inherits from:** [`Action`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Action.md)

## Description

A go-to action can be executed in a PDF document. A go-to action includes a hyperlink that, when clicked, takes the reader to a different place within the same document.

The action is linked to a bookmark within the document.

A remote go-to action includes a hyperlink that takes the reader to a destination in a separate document.

**Uses types:** [`Action`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Action.md), [`PDFDict`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/PDFDict.md), [`ViewDestination`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/ViewDestination.md)

## Constructors

### GoToAction

```java
com.datalogics.PDFL.GoToAction.GoToAction(ViewDestination dest)
```

*constructor*

**Parameters**

- `dest` ([`ViewDestination`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/ViewDestination.md)): The ViewDestination contained in this class.

General constructor

## Methods

### delete

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

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

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

**Returns:** `synchronized void`

### equals

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

**Parameters**

- `rhs` (`Object`)

**Returns:** `boolean`

### finalize

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

*protected*

**Returns:** `void`

### getDestination

```java
ViewDestination com.datalogics.PDFL.GoToAction.getDestination()
```

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

The ViewDestination for this action.

The ViewDestination that this go-to action navigates to.

### getPDFDict

```java
PDFDict com.datalogics.PDFL.Action.getPDFDict()
```

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

The underlying PDF dictionary for this Action.

Retrieve the PDFObject representation of this object.

### getSubtype

```java
String com.datalogics.PDFL.Action.getSubtype()
```

**Returns:** `String`

The subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR".

The action's subtype.

### setDestination

```java
void com.datalogics.PDFL.GoToAction.setDestination(ViewDestination dest)
```

**Parameters**

- `dest` ([`ViewDestination`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/ViewDestination.md)): The ViewDestination to set, or null to remove.

**Returns:** `void`

The ViewDestination that this go-to action navigates to. Setting the destination to null removes the destination entry from the action dictionary.

### toString

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

**Returns:** `String`

A string describing this Action.

Returns a string representation of this Action. The string includes the action's subtype.
