# Action Class

> When a user clicks a link or bookmark in a PDF, an action occurs, moving the reader to a new location.

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

```java
class Action
```

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

**Derived classes:** [`GoToAction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/GoToAction.md), [`LaunchAction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/LaunchAction.md), [`RemoteGoToAction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/RemoteGoToAction.md), [`URIAction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/URIAction.md)

## Description

When a user clicks a link or bookmark in a PDF, an action occurs, moving the reader to a new location. An action can involve moving the reader to a new page in the file, for example.

Also, with a PDF Viewer a PDF file can have an Action that runs automatically when a user opens the file, or reaches a specific page.

Applications can support Actions in custom annotation types they add. Only GoTo and URI Actions are supported; you can only use an Action with the interface to move from one part of a file to another or open an external web page.

**Referenced by:** [`Action`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Action.md), [`Bookmark`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Bookmark.md), [`GoToAction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/GoToAction.md), [`LaunchAction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/LaunchAction.md), [`LinkAnnotation`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/LinkAnnotation.md), [`RemoteGoToAction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/RemoteGoToAction.md), [`URIAction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/URIAction.md)

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

## Constructors

### Action

```java
com.datalogics.PDFL.Action.Action(Document doc, String type)
```

*constructor*

**Parameters**

- `doc` ([`Document`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Document.md)): The document in which the action is created.
- `type` (`String`): The string corresponding to the action's subtype.

Creates a new action object.

## Methods

### delete

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

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.Action.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.Action.finalize()
```

*protected*

**Returns:** `void`

### 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.

### 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.
