Foxit PDF SDK
com.foxit.sdk.pdf.actions.RemoteGotoAction Class Reference
Inheritance diagram for com.foxit.sdk.pdf.actions.RemoteGotoAction:
com.foxit.sdk.pdf.actions.Action com.foxit.sdk.common.Base

Public Member Functions

 RemoteGotoAction (Action action)
 Constructor, with parent class object. More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
Destination getDestination () throws com.foxit.sdk.PDFException
 Get the destination information. More...
 
String getDestinationName () throws com.foxit.sdk.PDFException
 Get the destination name, which is defined in target PDF file. More...
 
FileSpec getFileSpec () throws com.foxit.sdk.PDFException
 Get the file specification which specifies the destination file. More...
 
int getNewWindowFlag () throws com.foxit.sdk.PDFException
 Get the flag which is used to decide whether to open the destination document in a new window or not. More...
 
void setDestination (Destination destination) throws com.foxit.sdk.PDFException
 Set the destination information, which is used to specify the position in target PDF file to jump to. More...
 
void setDestinationName (String dest_name) throws com.foxit.sdk.PDFException
 Set the destination name. More...
 
void setFileSpec (FileSpec file_specification) throws com.foxit.sdk.PDFException
 Set the file specification which specifies the destination file. More...
 
void setNewWindowFlag (int flag) throws com.foxit.sdk.PDFException
 Set the flag which is used to decide whether to open the destination document in a new window or not. More...
 
- Public Member Functions inherited from com.foxit.sdk.pdf.actions.Action
 Action (PDFDoc document, PDFDictionary action_dict)
 Constructor, with parameters. More...
 
 Action (Action action)
 Constructor, with another action object. More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
PDFDictionary getDict () throws com.foxit.sdk.PDFException
 Get PDF dictionary of current object. More...
 
PDFDoc getDocument () throws com.foxit.sdk.PDFException
 Get the PDF document, to which current action belongs. More...
 
Action getSubAction (int index) throws com.foxit.sdk.PDFException
 Get a sub-action by index. More...
 
int getSubActionCount () throws com.foxit.sdk.PDFException
 Get the count of sub-actions. More...
 
int getType () throws com.foxit.sdk.PDFException
 Get action type. More...
 
void insertSubAction (int index, Action sub_action) throws com.foxit.sdk.PDFException
 Insert a new sub-action to the location specified by index. More...
 
boolean isEmpty ()
 Check whether current object is empty or not. More...
 
void removeAllSubActions () throws com.foxit.sdk.PDFException
 Remove all the sub-actions. More...
 
void removeSubAction (int index) throws com.foxit.sdk.PDFException
 Remove a sub-action, specified by index. More...
 
void setSubAction (int index, Action sub_action) throws com.foxit.sdk.PDFException
 Set a sub-action by index. More...
 
- Public Member Functions inherited from com.foxit.sdk.common.Base
synchronized void delete ()
 Clean up related resources immediately. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from com.foxit.sdk.pdf.actions.Action
static Action create (PDFDoc document, int action_type) throws com.foxit.sdk.PDFException
 Create a new action, for specified action type. More...
 
- Static Public Attributes inherited from com.foxit.sdk.pdf.actions.Action
static final int e_NewWindowFlagFalse = 0
 "NewWindow" flag is false.
 
static final int e_NewWindowFlagNone = 2
 No "NewWindow" flag.
 
static final int e_NewWindowFlagTrue = 1
 "NewWindow" flag is true.
 
static final int e_TypeGoto = 1
 Action type: go-to action.
 
static final int e_TypeGoTo3DView = 18
 Action type: go-to-3D-view action.
 
static final int e_TypeGoToE = 3
 Action type: embedded go-to action.
 
static final int e_TypeGoToR = 2
 Action type: remote go-to action.
 
static final int e_TypeHide = 9
 Action type: hide action.
 
static final int e_TypeImportData = 13
 Action type: import-data action.
 
static final int e_TypeJavaScript = 14
 Action type: JavaScript action.
 
static final int e_TypeLaunch = 4
 Action type: launch action.
 
static final int e_TypeMovie = 8
 Action type: movie action.
 
static final int e_TypeNamed = 10
 Action type: named action.
 
static final int e_TypeRendition = 16
 Action type: rendition action.
 
static final int e_TypeResetForm = 12
 Action type: reset-form action.
 
static final int e_TypeSetOCGState = 15
 Action type: set-OCG-state action.
 
static final int e_TypeSound = 7
 Action type: sound action.
 
static final int e_TypeSubmitForm = 11
 Action type: submit-form action.
 
static final int e_TypeThread = 5
 Action type: thread action.
 
static final int e_TypeTrans = 17
 Action type: transition action.
 
static final int e_TypeUnknown = 0
 Action type: unknown action.
 
static final int e_TypeURI = 6
 Action type: uniform resource identifier (URI) action.
 

Detailed Description

Remote go-to action is similar to an ordinary go-to action but jumps to a destination in another PDF file (not embedded file) instead of current PDF file (which contains the remote go-to action).
Class com.foxit.sdk.pdf.actions.RemoteGotoAction is derived from Action and offers functions to get/set remote go-to action data. Destination information of a remote go-to action can be represents as either a destination array or a destination name:

  • If the destination information is a destination array, Foxit PDF SDK uses a destination object to represent it and RemoteGotoAction.getDestination can be used to get such value.

  • If the destination information is a destination name, Foxit PDF SDK uses a string to represent it and RemoteGotoAction.getDestinationName can be used to get such value. Specially, the related destination array is defined in the target PDF file, not current PDF file. User can use functions in class com.foxit.sdk.pdf.objects.PDFNameTree to retrieve the actual destination array from target PDF file.

Destination PDF file and destination information are necessary for a remote go-to action, so user should ensure to set both data by RemoteGotoAction.setFileSpec and RemoteGotoAction.setDestination or RemoteGotoAction.setDestinationName , especially for a new remote go-to action; otherwise, the remote go-to action would be useless.

See also
Action

Constructor & Destructor Documentation

◆ RemoteGotoAction()

com.foxit.sdk.pdf.actions.RemoteGotoAction.RemoteGotoAction ( Action  action)

Constructor, with parent class object.

Parameters
[in]actionParent class object.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.pdf.actions.RemoteGotoAction.delete ( )

Clean up related resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

◆ getDestination()

Destination com.foxit.sdk.pdf.actions.RemoteGotoAction.getDestination ( ) throws com.foxit.sdk.PDFException

Get the destination information.

For a remote go-to action, the destination information can be stored as either a destination object or a destination name:

If the return value of function Destination.isEmpty for the returned destination object is true and function RemoteGotoAction.getDestinationName returns an empty string, that means the remote go-to action does not have any destination information.

Returns
A destination object. If the return value of function Destination.isEmpty for the returned destination object is true, please try function RemoteGotoAction.getDestinationName .

◆ getDestinationName()

String com.foxit.sdk.pdf.actions.RemoteGotoAction.getDestinationName ( ) throws com.foxit.sdk.PDFException

Get the destination name, which is defined in target PDF file.

For a remote go-to action, the destination information can be stored as either a destination object or a destination name:

If the return value of function Destination.isEmpty for the returned destination object is true and function RemoteGotoAction.getDestinationName returns an empty string, that means the remote go-to action does not have any destination information.

Returns
The destination name. If this function returns an empty string, please try function RemoteGotoAction.getDestination .

◆ getFileSpec()

FileSpec com.foxit.sdk.pdf.actions.RemoteGotoAction.getFileSpec ( ) throws com.foxit.sdk.PDFException

Get the file specification which specifies the destination file.

Returns
A non-embedded file specification object.

◆ getNewWindowFlag()

int com.foxit.sdk.pdf.actions.RemoteGotoAction.getNewWindowFlag ( ) throws com.foxit.sdk.PDFException

Get the flag which is used to decide whether to open the destination document in a new window or not.

Returns
The new window flag. It would be one of following values:

◆ setDestination()

void com.foxit.sdk.pdf.actions.RemoteGotoAction.setDestination ( Destination  destination) throws com.foxit.sdk.PDFException

Set the destination information, which is used to specify the position in target PDF file to jump to.

Parameters
[in]destinationA valid destination object to be set.
Returns
None.

◆ setDestinationName()

void com.foxit.sdk.pdf.actions.RemoteGotoAction.setDestinationName ( String  dest_name) throws com.foxit.sdk.PDFException

Set the destination name.

The destination name should have been in the "Dests" name tree in the target PDF file.

Parameters
[in]dest_nameA destination name to be set. It should be not be an empty string.
Returns
None.

◆ setFileSpec()

void com.foxit.sdk.pdf.actions.RemoteGotoAction.setFileSpec ( FileSpec  file_specification) throws com.foxit.sdk.PDFException

Set the file specification which specifies the destination file.

Parameters
[in]file_specificationA valid file specification object to be set. This object should belong to the same PDF file as current action. It should represent another PDF file as the target file, and should not represent an embedded file.
Returns
None.

◆ setNewWindowFlag()

void com.foxit.sdk.pdf.actions.RemoteGotoAction.setNewWindowFlag ( int  flag) throws com.foxit.sdk.PDFException

Set the flag which is used to decide whether to open the destination document in a new window or not.

Parameters
[in]flagThe new window flag. It should be one of following values:
Returns
None.