Foxit PDF SDK
FoxitPDFSDKPython3.Action Class Reference
Inheritance diagram for FoxitPDFSDKPython3.Action:
FoxitPDFSDKPython3.Base FoxitPDFSDKPython3.EmbeddedGotoAction FoxitPDFSDKPython3.GotoAction FoxitPDFSDKPython3.HideAction FoxitPDFSDKPython3.ImportDataAction FoxitPDFSDKPython3.JavaScriptAction FoxitPDFSDKPython3.LaunchAction FoxitPDFSDKPython3.NamedAction FoxitPDFSDKPython3.RemoteGotoAction FoxitPDFSDKPython3.RenditionAction FoxitPDFSDKPython3.ResetFormAction FoxitPDFSDKPython3.SubmitFormAction FoxitPDFSDKPython3.URIAction

Public Member Functions

def Action (action)
 Constructor, with another action object.
More...
 
def GetDict ()
 Get PDF dictionary of current object.
More...
 
def GetDocument ()
 Get the PDF document, to which current action belongs.
More...
 
def GetSubAction (index)
 Get a sub-action by index.
More...
 
def GetSubActionCount ()
 Get the count of sub-actions.
More...
 
def GetType ()
 Get action type.
More...
 
def InsertSubAction (index, sub_action)
 Insert a new sub-action to the location specified by index.
More...
 
def IsEmpty ()
 Check whether current object is empty or not.
More...
 
def RemoveAllSubActions ()
 Remove all the sub-actions.
More...
 
def RemoveSubAction (index)
 Remove a sub-action, specified by index.
More...
 
def SetSubAction (index, sub_action)
 Set a sub-action by index.
More...
 

Static Public Member Functions

def Create (dictionary)
 Create a new action, for specified action type.
More...
 

Static Public Attributes

 e_NewWindowFlagFalse = _fsdk.Action_e_NewWindowFlagFalse
 "NewWindow" flag is false.

 
 e_NewWindowFlagNone = _fsdk.Action_e_NewWindowFlagNone
 No "NewWindow" flag.

 
 e_NewWindowFlagTrue = _fsdk.Action_e_NewWindowFlagTrue
 "NewWindow" flag is true.

 
 e_TypeGoto = _fsdk.Action_e_TypeGoto
 Action type: go-to action.

 
 e_TypeGoTo3DView = _fsdk.Action_e_TypeGoTo3DView
 Action type: go-to-3D-view action.

 
 e_TypeGoToE = _fsdk.Action_e_TypeGoToE
 Action type: embedded go-to action.

 
 e_TypeGoToR = _fsdk.Action_e_TypeGoToR
 Action type: remote go-to action.

 
 e_TypeHide = _fsdk.Action_e_TypeHide
 Action type: hide action.

 
 e_TypeImportData = _fsdk.Action_e_TypeImportData
 Action type: import-data action.

 
 e_TypeJavaScript = _fsdk.Action_e_TypeJavaScript
 Action type: JavaScript action.

 
 e_TypeLaunch = _fsdk.Action_e_TypeLaunch
 Action type: launch action.

 
 e_TypeMovie = _fsdk.Action_e_TypeMovie
 Action type: movie action.

 
 e_TypeNamed = _fsdk.Action_e_TypeNamed
 Action type: named action.

 
 e_TypeRendition = _fsdk.Action_e_TypeRendition
 Action type: rendition action.

 
 e_TypeResetForm = _fsdk.Action_e_TypeResetForm
 Action type: reset-form action.

 
 e_TypeSetOCGState = _fsdk.Action_e_TypeSetOCGState
 Action type: set-OCG-state action.

 
 e_TypeSound = _fsdk.Action_e_TypeSound
 Action type: sound action.

 
 e_TypeSubmitForm = _fsdk.Action_e_TypeSubmitForm
 Action type: submit-form action.

 
 e_TypeThread = _fsdk.Action_e_TypeThread
 Action type: thread action.

 
 e_TypeTrans = _fsdk.Action_e_TypeTrans
 Action type: transition action.

 
 e_TypeUnknown = _fsdk.Action_e_TypeUnknown
 Action type: unknown action.

 
 e_TypeURI = _fsdk.Action_e_TypeURI
 Action type: uniform resource identifier (URI) action.

 

Detailed Description

PDF supports following standard action types:
"Go-To Action", "Remote Go-To Action", "Embedded Go-To Action", "Launch Action", "Thread Action", "URI Action", "Sound Action","Movie Action", "Hide Action", "Named Action", "Submit-Form Action", "Reset-Form Action", "Import-Data Action", "JavaScript Action", "Set-OCG-State Action", "Rendition Action","Transition Action","Go-To-3D-View Action".
A PDF action may have sub-actions. When this action is triggered, its sub-actions should also be triggered in turn.
Class Action is the base class for all kinds of PDF actions. For concrete action types, please refer to derived classes. Function FoxitPDFSDKPython3.Action.Create can be used to create a new action – currently only support some action types. Please refer to comment of this function for more details. This class also offers functions to modify sub- actions.

Constructor & Destructor Documentation

◆ Action()

def FoxitPDFSDKPython3.Action.Action (   action)

Constructor, with another action object.

Parameters
[in]actionAnother action object.

Member Function Documentation

◆ Create()

FoxitPDFSDKPython3.Action.Create (   dictionary)
static

Create a new action, for specified action type.

The newly created action has no action data (except action type) yet. User needs to call the functions in concrete action classes to set action data.

Parameters
[in]documentA valid PDF document, to which the new action belongs.
[in]action_typeAction type, used to specify which type of action is to be created. Currently only support:
FoxitPDFSDKPython3.Action.e_TypeGoto , FoxitPDFSDKPython3.Action.e_TypeURI , FoxitPDFSDKPython3.Action.e_TypeJavaScript , FoxitPDFSDKPython3.Action.e_TypeNamed , FoxitPDFSDKPython3.Action.e_TypeGoToR , FoxitPDFSDKPython3.Action.e_TypeGoToE , FoxitPDFSDKPython3.Action.e_TypeSubmitForm , FoxitPDFSDKPython3.Action.e_TypeResetForm , FoxitPDFSDKPython3.Action.e_TypeHide , FoxitPDFSDKPython3.Action.e_TypeLaunch , FoxitPDFSDKPython3.Action.e_TypeImportData , FoxitPDFSDKPython3.Action.e_TypeRendition .
Returns
A new action object, with no action data.

◆ GetDict()

def FoxitPDFSDKPython3.Action.GetDict ( )

Get PDF dictionary of current object.

Returns
The PDF dictionary.If there is any error, this function will return null.

◆ GetDocument()

def FoxitPDFSDKPython3.Action.GetDocument ( )

Get the PDF document, to which current action belongs.

Returns
A PDF document object.

◆ GetSubAction()

def FoxitPDFSDKPython3.Action.GetSubAction (   index)

Get a sub-action by index.

Parameters
[in]indexIndex of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.Action.GetSubActionCount .
Returns
An action object that represents the specified sub-action.

◆ GetSubActionCount()

def FoxitPDFSDKPython3.Action.GetSubActionCount ( )

Get the count of sub-actions.

Returns
Count of sub-actions.

◆ GetType()

def FoxitPDFSDKPython3.Action.GetType ( )

Get action type.

Returns
Action type. Please refer to values starting from FoxitPDFSDKPython3.Action.e_TypeGoto and this would be one of these values.

◆ InsertSubAction()

def FoxitPDFSDKPython3.Action.InsertSubAction (   index,
  sub_action 
)

Insert a new sub-action to the location specified by index.

Parameters
[in]indexIndex of the location, where the new sub-action is inserted.
If this index value is below zero, the new sub-action will be inserted to be the first.
If this index value equals or larger than current sub-action count, the new sub-action will be inserted to be the last.
[in]sub_actionNew sub-action to be inserted. Currently only support following types as the new sub-action:
FoxitPDFSDKPython3.Action.e_TypeGoto , FoxitPDFSDKPython3.Action.e_TypeURI , FoxitPDFSDKPython3.Action.e_TypeJavaScript , FoxitPDFSDKPython3.Action.e_TypeNamed , FoxitPDFSDKPython3.Action.e_TypeGoToR , FoxitPDFSDKPython3.Action.e_TypeGoToE , FoxitPDFSDKPython3.Action.e_TypeSubmitForm , FoxitPDFSDKPython3.Action.e_TypeResetForm , FoxitPDFSDKPython3.Action.e_TypeHide , FoxitPDFSDKPython3.Action.e_TypeLaunch , FoxitPDFSDKPython3.Action.e_TypeImportData , FoxitPDFSDKPython3.Action.e_TypeRendition .
Returns
None.

◆ IsEmpty()

def FoxitPDFSDKPython3.Action.IsEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ RemoveAllSubActions()

def FoxitPDFSDKPython3.Action.RemoveAllSubActions ( )

Remove all the sub-actions.

Returns
None.

◆ RemoveSubAction()

def FoxitPDFSDKPython3.Action.RemoveSubAction (   index)

Remove a sub-action, specified by index.

Parameters
[in]indexIndex of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.Action.GetSubActionCount .
Returns
None.

◆ SetSubAction()

def FoxitPDFSDKPython3.Action.SetSubAction (   index,
  sub_action 
)