Foxit PDF SDK

Public Member Functions | List of all members
foxit::pdf::actions::RemoteGotoAction Class Reference
Inheritance diagram for foxit::pdf::actions::RemoteGotoAction:

## Public Member Functions
| RemoteGotoAction (const Action &action)
| Constructor, with parent class object. More...
Destination | GetDestination ()
| Get the destination information. More...
String | GetDestinationName ()
| Get the destination name, which is defined in target PDF file. More...
FileSpec | GetFileSpec ()
| Get the file specification which specifies the destination file. More...
NewWindowFlag | GetNewWindowFlag ()
| Get the flag which is used to decide whether to open the destination document in a new window or not. More...
void | SetDestination (const Destination &destination)
| Set the destination information, which is used to specify the position in target PDF file to jump to. More...
void | SetDestinationName (const String &dest_name)
| Set the destination name. More...
void | SetFileSpec (const FileSpec &file_specification)
| Set the file specification which specifies the destination file. More...
void | SetNewWindowFlag (NewWindowFlag flag)
| 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 foxit::pdf::actions::Action
| Action (const Action &action)
| Constructor, with another action object. More...
| Action (const PDFDoc &document, objects::PDFDictionary *action_dict)
| Constructor, with parameters. More...
| ~Action ()
| Destructor.
objects::PDFDictionary * | GetDict () const
| Get PDF dictionary of current object. More...
PDFDoc | GetDocument ()
| Get the PDF document, to which current action belongs. More...
Action | GetSubAction (int index)
| Get a sub-action by index. More...
int | GetSubActionCount ()
| Get the count of sub-actions. More...
Type | GetType ()
| Get action type. More...
void | InsertSubAction (int index, const Action &sub_action)
| Insert a new sub-action to the location specified by index. More...
bool | IsEmpty () const
| Check whether current object is empty or not. More...
bool | operator!= (const Action &other) const
| Not equal operator. More...
Action & | operator= (const Action &other)
| Assign operator. More...
bool | operator== (const Action &other) const
| Equal operator. More...
void | RemoveAllSubActions ()
| Remove all the sub-actions. More...
void | RemoveSubAction (int index)
| Remove a sub-action, specified by index. More...
void | SetSubAction (int index, const Action &sub_action)
| Set a sub-action by index. More...
Public Member Functions inherited from foxit::Base
FS_HANDLE | Handle () const
| Get the handle of current object. More...

## Additional Inherited Members
Public Types inherited from foxit::pdf::actions::Action
enum | NewWindowFlag { e_NewWindowFlagFalse = 0, e_NewWindowFlagTrue = 1, e_NewWindowFlagNone = 2 }
| Enumeration for new window flag. More...
enum | Type { e_TypeUnknown = 0, e_TypeGoto = 1, e_TypeGoToR = 2, e_TypeGoToE = 3, e_TypeLaunch = 4, e_TypeThread = 5, e_TypeURI = 6, e_TypeSound = 7, e_TypeMovie = 8, e_TypeHide = 9, e_TypeNamed = 10, e_TypeSubmitForm = 11, e_TypeResetForm = 12, e_TypeImportData = 13, e_TypeJavaScript = 14, e_TypeSetOCGState = 15, e_TypeRendition = 16, e_TypeTrans = 17, e_TypeGoTo3DView = 18 }
| Enumeration for action type. More...
Static Public Member Functions inherited from foxit::pdf::actions::Action
static Action | Create (const foxit::pdf::PDFDoc &document, Type action_type)
| Create a new action, for specified action type. More...

## 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 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 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()

foxit::pdf::actions::RemoteGotoAction::RemoteGotoAction | ( | const Action & | action | ) |
| explicit

Constructor, with parent class object.

Parameters

  [in] | action | Parent class object.

## Member Function Documentation

## ◆ GetDestination()

Destination foxit::pdf::actions::RemoteGotoAction::GetDestination | ( |  | ) |

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 it is a destination object, function RemoteGotoAction::GetDestination would return a valid destination object.
- If it is a destination name, function RemoteGotoAction::GetDestinationName would return a valid string, and the destination name would be defined in the target PDF file.

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 foxit::pdf::actions::RemoteGotoAction::GetDestinationName | ( |  | ) |

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 it is a destination object, function RemoteGotoAction::GetDestination would return a valid destination object.
- If it is a destination name, function RemoteGotoAction::GetDestinationName would return a valid string, and the destination name would be defined in the target PDF file.

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 foxit::pdf::actions::RemoteGotoAction::GetFileSpec | ( |  | ) |

Get the file specification which specifies the destination file.

Returns
  A non-embedded file specification object.

## ◆ GetNewWindowFlag()

NewWindowFlag foxit::pdf::actions::RemoteGotoAction::GetNewWindowFlag | ( |  | ) |

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:
  - Action::e_NewWindowFlagTrue means to open the destination document in a new window.
  - Action::e_NewWindowFlagFalse means that the destination document replaces current document in the same window.
  - Action::e_NewWindowFlagNone means that no such flag and the viewer application should behave in accordance with the current user preference.

## ◆ SetDestination()

void foxit::pdf::actions::RemoteGotoAction::SetDestination | ( | const Destination & | destination | ) |

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

Parameters

  [in] | destination | A valid destination object to be set.

Returns
  None.

## ◆ SetDestinationName()

void foxit::pdf::actions::RemoteGotoAction::SetDestinationName | ( | const String & | dest_name | ) |

Set the destination name.

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

Parameters

  [in] | dest_name | A destination name to be set. It should be not be an empty string.

Returns
  None.

## ◆ SetFileSpec()

void foxit::pdf::actions::RemoteGotoAction::SetFileSpec | ( | const FileSpec & | file_specification | ) |

Set the file specification which specifies the destination file.

Parameters

  [in] | file_specification | A 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 foxit::pdf::actions::RemoteGotoAction::SetNewWindowFlag | ( | NewWindowFlag | flag | ) |

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

Parameters

  [in] | flag | The new window flag. It should be one of following values: Action::e_NewWindowFlagTrue means to open the destination document in a new window. Action::e_NewWindowFlagFalse means that the destination document replaces current document in the same window. Action::e_NewWindowFlagNone means that such flag is not needed and the viewer application should behave in accordance with the current user preference.

Returns
  None.