org.apache.pdfbox.pdmodel.interactive.action

## Class PDActionEmbeddedGoTo

- java.lang.Object
- - org.apache.pdfbox.pdmodel.interactive.action.PDAction
  - - org.apache.pdfbox.pdmodel.interactive.action.PDActionEmbeddedGoTo

All Implemented Interfaces:
  COSObjectable, PDDestinationOrAction

    public class PDActionEmbeddedGoTo
    extends PDAction

This represents a embedded go-to action that can be executed in a PDF document.

Author:
  Ben Litchfield, Panagiotis Toumasis, Tilman Hausherr

### Field Summary

Fields
`static String` `SUB_TYPE` This type of action this object represents.

### Fields inherited from class org.apache.pdfbox.pdmodel.interactive.action.PDAction

`action, TYPE`

### Constructor Summary

Constructors
Constructor and Description
`PDActionEmbeddedGoTo()` Default constructor.
`PDActionEmbeddedGoTo(COSDictionary a)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`PDDestination` `getDestination()` This will get the destination to jump to.
`PDFileSpecification` `getFile()` This will get the file in which the destination is located.
`OpenMode` `getOpenInNewWindow()` This will specify whether to open the destination document in a new window, in the same window, or behave in accordance with the current user preference.
`PDTargetDirectory` `getTargetDirectory()` Get the target directory.
`void` `setDestination(PDDestination d)` This will set the destination to jump to.
`void` `setFile(PDFileSpecification fs)` This will set the file in which the destination is located.
`void` `setOpenInNewWindow(OpenMode value)` This will specify whether to open the destination document in a new window.
`void` `setTargetDirectory(PDTargetDirectory targetDirectory)` Sets the target directory.

### Methods inherited from class org.apache.pdfbox.pdmodel.interactive.action.PDAction

`getCOSObject, getNext, getSubType, getType, setNext, setSubType, setType`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### SUB_TYPE

    public static final String SUB_TYPE

This type of action this object represents.

See Also:
  Constant Field Values

### Constructor Detail

#### PDActionEmbeddedGoTo

    public PDActionEmbeddedGoTo()

Default constructor.

#### PDActionEmbeddedGoTo

    public PDActionEmbeddedGoTo(COSDictionary a)

Constructor.

Parameters:
  `a` - The action dictionary.

### Method Detail

#### getDestination

    public PDDestination getDestination()
                                 throws IOException

This will get the destination to jump to.

Returns:
  The D entry of the specific go-to action dictionary.
Throws:
  `IOException` - If there is an error creating the destination.

#### setDestination

    public void setDestination(PDDestination d)

This will set the destination to jump to.

Parameters:
  `d` - The destination.
Throws:
  `IllegalArgumentException` - if the destination is not a page dictionary object.

#### getFile

    public PDFileSpecification getFile()
                                throws IOException

This will get the file in which the destination is located.

Returns:
  The F entry of the specific embedded go-to action dictionary.
Throws:
  `IOException` - If there is an error creating the file spec.

#### setFile

    public void setFile(PDFileSpecification fs)

This will set the file in which the destination is located.

Parameters:
  `fs` - The file specification.

#### getOpenInNewWindow

    public OpenMode getOpenInNewWindow()

This will specify whether to open the destination document in a new window, in the same window, or behave in accordance with the current user preference.

Returns:
  A flag specifying how to open the destination document, never null.

#### setOpenInNewWindow

    public void setOpenInNewWindow(OpenMode value)

This will specify whether to open the destination document in a new window.

Parameters:
  `value` - The flag value.

#### getTargetDirectory

    public PDTargetDirectory getTargetDirectory()

Get the target directory.

Returns:
  the target directory or null if there is none.

#### setTargetDirectory

    public void setTargetDirectory(PDTargetDirectory targetDirectory)

Sets the target directory.

Parameters:
  `targetDirectory` - the target directory.