Foxit PDF SDK
|
Instance Methods | |
(FSPDFDictionary *) | - getDict |
Get PDF dictionary of current object. More... | |
(FSPDFDoc *) | - getDocument |
Get the PDF document, to which current action belongs. More... | |
(FSAction *) | - getSubAction: |
Get a sub-action by index. More... | |
(int) | - getSubActionCount |
Get the count of sub-actions. More... | |
(FSActionType) | - getType |
Get action type. More... | |
(id) | - initWithAction: |
Constructor, with another action object. More... | |
(id) | - initWithDocument:action_dict: |
Constructor, with parameters. More... | |
(void) | - insertSubAction:sub_action: |
Insert a new sub-action to the location specified by index. More... | |
(BOOL) | - isEmpty |
Check whether current object is empty or not. More... | |
(void) | - removeAllSubActions |
Remove all the sub-actions. More... | |
(void) | - removeSubAction: |
Remove a sub-action, specified by index. More... | |
(void) | - setSubAction:sub_action: |
Set a sub-action by index. More... | |
Class Methods | |
(FSAction *) | + create:action_type: |
Create a new action, for specified action type. More... | |
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 FSAction is the base class for all kinds of PDF actions. For concrete action types, please refer to derived classes. Function Action::create:action_type: 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.
+ (FSAction *) create: | (FSPDFDoc*) | document | |
action_type: | (FSActionType) | action_type | |
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.
[in] | document | A valid PDF document, to which the new action belongs. |
[in] | action_type | Action type, used to specify which type of action is to be created. Currently only support: FSActionTypeGoto, FSActionTypeURI, FSActionTypeJavaScript, FSActionTypeNamed, FSActionTypeGoToR, FSActionTypeGoToE, FSActionTypeSubmitForm, FSActionTypeResetForm, FSActionTypeHide, FSActionTypeLaunch, FSActionTypeImportData, FSActionTypeRendition. |
- (FSPDFDictionary *) getDict |
Get PDF dictionary of current object.
- (FSPDFDoc *) getDocument |
Get the PDF document, to which current action belongs.
- (FSAction *) getSubAction: | (int) | index |
Get a sub-action by index.
[in] | index | Index of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function Action::getSubActionCount. |
- (int) getSubActionCount |
Get the count of sub-actions.
- (FSActionType) getType |
Get action type.
- (id) initWithAction: | (FSAction*) | action |
Constructor, with another action object.
[in] | action | Another action object. |
Reimplemented in FSRenditionAction, FSLaunchAction, FSHideAction, FSImportDataAction, FSResetFormAction, FSSubmitFormAction, FSEmbeddedGotoAction, FSRemoteGotoAction, FSNamedAction, FSJavaScriptAction, FSURIAction, and FSGotoAction.
- (id) initWithDocument: | (FSPDFDoc*) | document | |
action_dict: | (FSPDFDictionary*) | action_dict | |
Constructor, with parameters.
[in] | document | A valid PDF document object. |
[in] | action_dict | A PDF dictionary object that represents an action. |
- (void) insertSubAction: | (int) | index | |
sub_action: | (FSAction*) | sub_action | |
Insert a new sub-action to the location specified by index.
[in] | index | Index 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_action | New sub-action to be inserted. Currently only support following types as the new sub-action: FSActionTypeGoto, FSActionTypeURI, FSActionTypeJavaScript, FSActionTypeNamed, FSActionTypeGoToR, FSActionTypeGoToE, FSActionTypeSubmitForm, FSActionTypeResetForm, FSActionTypeHide, FSActionTypeLaunch, FSActionTypeImportData, FSActionTypeRendition. |
- (BOOL) isEmpty |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
- (void) removeAllSubActions |
Remove all the sub-actions.
- (void) removeSubAction: | (int) | index |
Remove a sub-action, specified by index.
[in] | index | Index of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function Action::getSubActionCount. |
- (void) setSubAction: | (int) | index | |
sub_action: | (FSAction*) | sub_action | |
Set a sub-action by index.
[in] | index | Index of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function Action::getSubActionCount. |
[in] | sub_action | An action object to be set as a sub-action. Currently only support following types as sub-action: FSActionTypeGoto, FSActionTypeURI, FSActionTypeJavaScript, FSActionTypeNamed, FSActionTypeGoToR, FSActionTypeGoToE, FSActionTypeSubmitForm, FSActionTypeResetForm, FSActionTypeHide, FSActionTypeLaunch, FSActionTypeImportData, FSActionTypeRendition. |