Class PDActionRemoteGoTo
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.interactive.action.type.PDAction
-
- org.apache.pdfbox.pdmodel.interactive.action.type.PDActionRemoteGoTo
-
- All Implemented Interfaces:
COSObjectable
,PDDestinationOrAction
public class PDActionRemoteGoTo extends PDAction
This represents a remote go-to action that can be executed in a PDF document.- Version:
- $Revision: 1.4 $
- Author:
- Ben Litchfield, Panagiotis Toumasis (ptoumasis@mail.gr)
-
-
Constructor Summary
Constructors Constructor Description PDActionRemoteGoTo()
Default constructor.PDActionRemoteGoTo(COSDictionary a)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description COSDictionary
getCOSDictionary()
Convert this standard java object to a COS object.COSBase
getCOSObject()
Convert this standard java object to a COS object.COSBase
getD()
This will get the destination to jump to.PDFileSpecification
getFile()
This will get the file in which the destination is located.java.lang.String
getS()
This will get the type of action that the actions dictionary describes.void
setD(COSBase 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(boolean value)
This will specify the destination document to open in a new window.void
setS(java.lang.String s)
This will set the type of action that the actions dictionary describes.boolean
shouldOpenInNewWindow()
This will specify whether to open the destination document in a new window.-
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.action.type.PDAction
getNext, getSubType, getType, setNext, setSubType, setType
-
-
-
-
Field Detail
-
SUB_TYPE
public static final java.lang.String SUB_TYPE
This type of action this object represents.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PDActionRemoteGoTo
public PDActionRemoteGoTo()
Default constructor.
-
PDActionRemoteGoTo
public PDActionRemoteGoTo(COSDictionary a)
Constructor.- Parameters:
a
- The action dictionary.
-
-
Method Detail
-
getCOSObject
public COSBase getCOSObject()
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Overrides:
getCOSObject
in classPDAction
- Returns:
- The cos object that matches this Java object.
-
getCOSDictionary
public COSDictionary getCOSDictionary()
Convert this standard java object to a COS object.- Overrides:
getCOSDictionary
in classPDAction
- Returns:
- The cos object that matches this Java object.
-
getS
public java.lang.String getS()
This will get the type of action that the actions dictionary describes. It must be GoToR for a remote go-to action.- Returns:
- The S entry of the specific remote go-to action dictionary.
-
setS
public void setS(java.lang.String s)
This will set the type of action that the actions dictionary describes. It must be GoToR for a remote go-to action.- Parameters:
s
- The remote go-to action.
-
getFile
public PDFileSpecification getFile() throws java.io.IOException
This will get the file in which the destination is located.- Returns:
- The F entry of the specific remote go-to action dictionary.
- Throws:
java.io.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.
-
getD
public COSBase getD()
This will get the destination to jump to. If the value is an array defining an explicit destination, its first element must be a page number within the remote document rather than an indirect reference to a page object in the current document. The first page is numbered 0.- Returns:
- The D entry of the specific remote go-to action dictionary.
-
setD
public void setD(COSBase d)
This will set the destination to jump to. If the value is an array defining an explicit destination, its first element must be a page number within the remote document rather than an indirect reference to a page object in the current document. The first page is numbered 0.- Parameters:
d
- The destination.
-
shouldOpenInNewWindow
public boolean shouldOpenInNewWindow()
This will specify whether to open the destination document in a new window. If this flag is false, the destination document will replace the current document in the same window. If this entry is absent, the viewer application should behave in accordance with the current user preference.- Returns:
- A flag specifying whether to open the destination document in a new window.
-
setOpenInNewWindow
public void setOpenInNewWindow(boolean value)
This will specify the destination document to open in a new window.- Parameters:
value
- The flag value.
-
-