PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
PDF::Action Class Reference

Represents an action in a PDF document. More...

#include <pdfsdk/cxx/action.h>

Inheritance diagram for PDF::Action:

Public Member Functions

Object GetPdfObject () const
 
bool Equals (const Action &that) const
 
PDAtom GetActionType () const
 
void SetNext (const Action &next)
 
void SetNextArray (const std::vector< Action > &next)
 
size_t GetNextLength () const
 
Action GetNext (size_t index)
 
Dest GetGoToDest () const
 
void SetGoToDest (const Dest &destination)
 
FileSpec GetGoToRFileSpec () const
 
void SetGoToRFileSpec (const FileSpec &filespec)
 
Dest GetGoToRDest () const
 
void SetGoToRDest (const Dest &destination)
 
bool GetGoToRNewWindow () const
 
void SetGoToRNewWindow (bool newWindow)
 
std::wstring GetGoToEFileName () const
 
void SetGoToEFileName (const std::wstring &filename)
 
Object GetGoToETarget () const
 
void SetGoToETarget (const Object &target)
 
FileSpec GetGoToEFileSpec () const
 
void SetGoToEFileSpec (const FileSpec &filespec)
 
Dest GetGoToEDest () const
 
void SetGoToEDest (const Dest &destination)
 
bool GetGoToENewWindow () const
 
void SetGoToENewWindow (bool newWindow)
 
FileSpec GetLaunchFileSpec () const
 
void SetLaunchFileSpec (const FileSpec &filespec)
 
bool GetLaunchNewWindow () const
 
void SetLaunchNewWindow (bool newWindow)
 
std::string GetURIURI () const
 
void SetURIURI (const std::string &uri)
 
bool GetURIIsMap () const
 
void SetURIIsMap (bool isMap)
 
size_t GetHideNumItems () const
 
void RemoveHideItem (size_t index)
 
PDActionHideItemType GetHideItemType (size_t index) const
 
Annot GetHideItemAnnot (size_t index) const
 
std::wstring GetHideItemFieldName (size_t index) const
 
void AddHideItemAnnot (Annot annot)
 
void AddHideItemFieldName (const std::wstring &name)
 
bool IsHideHiding () const
 
void SetHideHiding (bool isHiding)
 
PDAtom GetNamedName () const
 
void SetNamedName (PDAtom name)
 
std::wstring GetJavaScriptScript () const
 
void SetJavaScriptScript (const std::wstring &script)
 
 Action (PDAction handle, bool adopt=false) noexcept
 
 Action (const Action &rhs) noexcept
 
Actionoperator= (const Action &rhs) noexcept
 
 Action (Action &&rhs) noexcept
 
Actionoperator= (Action &&rhs) noexcept
 

Static Public Member Functions

static Action CreateFromPdfObject (const Object &object)
 

Detailed Description

Represents an action in a PDF document.

ISO 32000-2:2020 - 12.6 Actions

Member Function Documentation

◆ AddHideItemAnnot()

void PDF::Action::AddHideItemAnnot ( Annot annot)

Adds an annotation to the Hide array of a Hide action.

Parameters
annotThe annotation to add.

◆ AddHideItemFieldName()

void PDF::Action::AddHideItemFieldName ( const std::wstring & name)

Adds a field name to the Hide array of a Hide action.

Parameters
nameThe field name to add.

◆ CreateFromPdfObject()

static Action PDF::Action::CreateFromPdfObject ( const Object & object)
static

Creates an Action object from a PDF object.

Parameters
objectThe PDF object representing the action.
Returns
The created Action object.

◆ Equals()

bool PDF::Action::Equals ( const Action & that) const

Checks if this Action is equal to another Action.

Parameters
thatThe other Action to compare.
Returns
true if the Actions are equal, false otherwise.

◆ GetActionType()

PDAtom PDF::Action::GetActionType ( ) const

Gets the type of the action.

Returns
The action type.

◆ GetGoToDest()

Dest PDF::Action::GetGoToDest ( ) const

Gets the destination of a GoTo action.

Returns
The destination.

◆ GetGoToEDest()

Dest PDF::Action::GetGoToEDest ( ) const

Gets the destination of a GoToE action.

Returns
The destination.

◆ GetGoToEFileName()

std::wstring PDF::Action::GetGoToEFileName ( ) const

Gets the file name of a GoToE action.

Returns
The file name.

◆ GetGoToEFileSpec()

FileSpec PDF::Action::GetGoToEFileSpec ( ) const

Gets the file specification of a GoToE action.

Returns
The file specification.

◆ GetGoToENewWindow()

bool PDF::Action::GetGoToENewWindow ( ) const

Checks if a GoToE action should open a new window.

Returns
True if a new window should be opened, false otherwise.

◆ GetGoToETarget()

Object PDF::Action::GetGoToETarget ( ) const

Gets the target object of a GoToE action.

Returns
The target object.

◆ GetGoToRDest()

Dest PDF::Action::GetGoToRDest ( ) const

Gets the destination of a GoToR action.

Returns
The destination.

◆ GetGoToRFileSpec()

FileSpec PDF::Action::GetGoToRFileSpec ( ) const

Gets the file specification of a GoToR action.

Returns
The file specification.

◆ GetGoToRNewWindow()

bool PDF::Action::GetGoToRNewWindow ( ) const

Checks if a GoToR action should open a new window.

Returns
True if a new window should be opened, false otherwise.

◆ GetHideItemAnnot()

Annot PDF::Action::GetHideItemAnnot ( size_t index) const

Gets the annotation of the item at the specified index in the Hide array of a Hide action.

Parameters
indexThe index of the item.
Returns
The annotation.

◆ GetHideItemFieldName()

std::wstring PDF::Action::GetHideItemFieldName ( size_t index) const

Gets the field name of the item at the specified index in the Hide array of a Hide action.

Parameters
indexThe index of the item.
Returns
The field name.

◆ GetHideItemType()

PDActionHideItemType PDF::Action::GetHideItemType ( size_t index) const

Gets the type of the item at the specified index in the Hide array of a Hide action.

Parameters
indexThe index of the item.
Returns
The type of the item.

◆ GetHideNumItems()

size_t PDF::Action::GetHideNumItems ( ) const

Gets the number of items in the Hide array of a Hide action.

Returns
The number of items in the Hide array.

◆ GetJavaScriptScript()

std::wstring PDF::Action::GetJavaScriptScript ( ) const

Gets the JavaScript script of a JavaScript action.

Returns
The JavaScript script.

◆ GetLaunchFileSpec()

FileSpec PDF::Action::GetLaunchFileSpec ( ) const

Gets the file specification of a Launch action.

Returns
The file specification.

◆ GetLaunchNewWindow()

bool PDF::Action::GetLaunchNewWindow ( ) const

Checks if a Launch action should open a new window.

Returns
True if a new window should be opened, false otherwise.

◆ GetNamedName()

PDAtom PDF::Action::GetNamedName ( ) const

Gets the named name of a Named action.

Returns
The named name.

◆ GetNext()

Action PDF::Action::GetNext ( size_t index)

Gets the next action at the specified index.

Parameters
indexThe index of the next action.
Returns
The next action.

◆ GetNextLength()

size_t PDF::Action::GetNextLength ( ) const

Gets the length of the next actions array.

Returns
The length of the next actions array.

◆ GetPdfObject()

Object PDF::Action::GetPdfObject ( ) const

Gets the PDF object associated with this Action.

Returns
The PDF object.

◆ GetURIIsMap()

bool PDF::Action::GetURIIsMap ( ) const

Checks if a URI action is a map.

Returns
True if the URI action is a map, false otherwise.

◆ GetURIURI()

std::string PDF::Action::GetURIURI ( ) const

Gets the URI of a URI action.

Returns
The URI.

◆ IsHideHiding()

bool PDF::Action::IsHideHiding ( ) const

Checks if a Hide action is hiding.

Returns
True if the Hide action is hiding, false otherwise.

◆ RemoveHideItem()

void PDF::Action::RemoveHideItem ( size_t index)

Removes the item at the specified index from the Hide array of a Hide action.

Parameters
indexThe index of the item to remove.

◆ SetGoToDest()

void PDF::Action::SetGoToDest ( const Dest & destination)

Sets the destination of a GoTo action.

Parameters
destinationThe destination.

◆ SetGoToEDest()

void PDF::Action::SetGoToEDest ( const Dest & destination)

Sets the destination of a GoToE action.

Parameters
destinationThe destination.

◆ SetGoToEFileName()

void PDF::Action::SetGoToEFileName ( const std::wstring & filename)

Sets the file name of a GoToE action.

Parameters
filenameThe file name.

◆ SetGoToEFileSpec()

void PDF::Action::SetGoToEFileSpec ( const FileSpec & filespec)

Sets the file specification of a GoToE action.

Parameters
filespecThe file specification.

◆ SetGoToENewWindow()

void PDF::Action::SetGoToENewWindow ( bool newWindow)

Sets whether a GoToE action should open a new window.

Parameters
newWindowTrue to open a new window, false otherwise.

◆ SetGoToETarget()

void PDF::Action::SetGoToETarget ( const Object & target)

Sets the target object of a GoToE action.

Parameters
targetThe target object.

◆ SetGoToRDest()

void PDF::Action::SetGoToRDest ( const Dest & destination)

Sets the destination of a GoToR action.

Parameters
destinationThe destination.

◆ SetGoToRFileSpec()

void PDF::Action::SetGoToRFileSpec ( const FileSpec & filespec)

Sets the file specification of a GoToR action.

Parameters
filespecThe file specification.

◆ SetGoToRNewWindow()

void PDF::Action::SetGoToRNewWindow ( bool newWindow)

Sets whether a GoToR action should open a new window.

Parameters
newWindowTrue to open a new window, false otherwise.

◆ SetHideHiding()

void PDF::Action::SetHideHiding ( bool isHiding)

Sets whether a Hide action is hiding.

Parameters
isHidingTrue if the Hide action is hiding, false otherwise.

◆ SetJavaScriptScript()

void PDF::Action::SetJavaScriptScript ( const std::wstring & script)

Sets the JavaScript script of a JavaScript action.

Parameters
scriptThe JavaScript script.

◆ SetLaunchFileSpec()

void PDF::Action::SetLaunchFileSpec ( const FileSpec & filespec)

Sets the file specification of a Launch action.

Parameters
filespecThe file specification.

◆ SetLaunchNewWindow()

void PDF::Action::SetLaunchNewWindow ( bool newWindow)

Sets whether a Launch action should open a new window.

Parameters
newWindowTrue to open a new window, false otherwise.

◆ SetNamedName()

void PDF::Action::SetNamedName ( PDAtom name)

Sets the named name of a Named action.

Parameters
nameThe named name.

◆ SetNext()

void PDF::Action::SetNext ( const Action & next)

Sets the next action.

Parameters
nextThe next action.

◆ SetNextArray()

void PDF::Action::SetNextArray ( const std::vector< Action > & next)

Sets an array of next actions.

Parameters
nextThe array of next actions.

◆ SetURIIsMap()

void PDF::Action::SetURIIsMap ( bool isMap)

Sets whether a URI action is a map.

Parameters
isMapTrue if the URI action is a map, false otherwise.

◆ SetURIURI()

void PDF::Action::SetURIURI ( const std::string & uri)

Sets the URI of a URI action.

Parameters
uriThe URI.

The documentation for this class was generated from the following file: