Action Class Documentation
class ActionNamespace:datalogics_interface
- Derived classes:
- GoToAction, LaunchAction, RemoteGoToAction, URIAction
Detailed 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
Uses types
Constructor & Destructor Documentation
Action
Action(Action && )Parameters
Action
Action(const Document & doc, const std::string & type)Parameters
doc: const Document &The document in which the action is created.
type: const std::string &The string corresponding to the action's subtype.
Creates a new action object.
~Action
~Action()Member Function Documentation
get_pdf_dict
PDFDict get_pdf_dict()Returns:
PDFDictThe underlying PDF dictionary for this Action.
Retrieve the PDFObject representation of this object.
get_subtype
std::string get_subtype()Returns:
std::stringThe subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR".
The action's subtype.
operator=
Parameters
Returns:
Action &operator==
bool operator==(const Action & other)Parameters
other: const Action &
Returns:
booltrue if the two objects refer to the same action, false otherwise.
Determines whether this Action is equal to another.
Two Actions are considered equal if they refer to the same underlying PDF action object.
to_string
std::string to_string()Returns:
std::stringA string describing this Action.
Returns a string representation of this Action.
The string includes the action's subtype.
try_as
T * try_as(typename T )Parameters
: typename T
Returns:
T *Attempt to downcast this action to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match.
try_as
const T * try_as(typename T )Parameters
: typename T
Returns:
const T *Const overload of try_as(). Returns a const pointer, or nullptr.