Foxit PDF SDK
|
Public Types | |
enum | NewWindowFlag { NewWindowFlag.e_NewWindowFlagFalse = 0, NewWindowFlag.e_NewWindowFlagTrue = 1, NewWindowFlag.e_NewWindowFlagNone = 2 } |
Enumeration for new window flag. More... | |
enum | Type { Type.e_TypeUnknown = 0, Type.e_TypeGoto = 1, Type.e_TypeGoToR = 2, Type.e_TypeGoToE = 3, Type.e_TypeLaunch = 4, Type.e_TypeThread = 5, Type.e_TypeURI = 6, Type.e_TypeSound = 7, Type.e_TypeMovie = 8, Type.e_TypeHide = 9, Type.e_TypeNamed = 10, Type.e_TypeSubmitForm = 11, Type.e_TypeResetForm = 12, Type.e_TypeImportData = 13, Type.e_TypeJavaScript = 14, Type.e_TypeSetOCGState = 15, Type.e_TypeRendition = 16, Type.e_TypeTrans = 17, Type.e_TypeGoTo3DView = 18 } |
Enumeration for action type. More... | |
Public Member Functions | |
Action (PDFDoc document, PDFDictionary action_dict) | |
Constructor, with parameters. More... | |
Action (Action action) | |
Constructor, with another action object. More... | |
PDFDictionary | GetDict () |
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... | |
Action.Type | GetType () |
Get action type. More... | |
void | InsertSubAction (int index, Action 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 (int index) |
Remove a sub-action, specified by index. More... | |
void | SetSubAction (int index, Action sub_action) |
Set a sub-action by index. More... | |
Static Public Member Functions | |
static Action | Create (PDFDoc document, Action.Type 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 Action is the base class for all kinds of PDF actions. For concrete action types, please refer to derived classes. Function 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.
Enumeration for action type.
Values of this enumeration should be used alone.
|
inline |
Constructor, with parameters.
[in] | document | A valid PDF document object. |
[in] | action_dict | A PDF dictionary object that represents an action. |
|
inline |
Constructor, with another action object.
[in] | action | Another action object. |
|
inlinestatic |
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: foxit.pdf.actions.Action.Type.e_TypeGoto , foxit.pdf.actions.Action.Type.e_TypeURI , foxit.pdf.actions.Action.Type.e_TypeJavaScript , foxit.pdf.actions.Action.Type.e_TypeNamed , foxit.pdf.actions.Action.Type.e_TypeGoToR , foxit.pdf.actions.Action.Type.e_TypeGoToE , foxit.pdf.actions.Action.Type.e_TypeSubmitForm , foxit.pdf.actions.Action.Type.e_TypeResetForm , foxit.pdf.actions.Action.Type.e_TypeHide , foxit.pdf.actions.Action.Type.e_TypeLaunch , foxit.pdf.actions.Action.Type.e_TypeImportData , foxit.pdf.actions.Action.Type.e_TypeRendition . |
|
inline |
Get PDF dictionary of current object.
|
inline |
Get the PDF document, to which current action belongs.
|
inline |
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 . |
|
inline |
Get the count of sub-actions.
|
inline |
Get action type.
|
inline |
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: foxit.pdf.actions.Action.Type.e_TypeGoto , foxit.pdf.actions.Action.Type.e_TypeURI , foxit.pdf.actions.Action.Type.e_TypeJavaScript , foxit.pdf.actions.Action.Type.e_TypeNamed , foxit.pdf.actions.Action.Type.e_TypeGoToR , foxit.pdf.actions.Action.Type.e_TypeGoToE , foxit.pdf.actions.Action.Type.e_TypeSubmitForm , foxit.pdf.actions.Action.Type.e_TypeResetForm , foxit.pdf.actions.Action.Type.e_TypeHide , foxit.pdf.actions.Action.Type.e_TypeLaunch , foxit.pdf.actions.Action.Type.e_TypeImportData , foxit.pdf.actions.Action.Type.e_TypeRendition . |
|
inline |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
|
inline |
Remove all the sub-actions.
|
inline |
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 . |
|
inline |
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: foxit.pdf.actions.Action.Type.e_TypeGoto , foxit.pdf.actions.Action.Type.e_TypeURI , foxit.pdf.actions.Action.Type.e_TypeJavaScript , foxit.pdf.actions.Action.Type.e_TypeNamed , foxit.pdf.actions.Action.Type.e_TypeGoToR , foxit.pdf.actions.Action.Type.e_TypeGoToE , foxit.pdf.actions.Action.Type.e_TypeSubmitForm , foxit.pdf.actions.Action.Type.e_TypeResetForm , foxit.pdf.actions.Action.Type.e_TypeHide , foxit.pdf.actions.Action.Type.e_TypeLaunch , foxit.pdf.actions.Action.Type.e_TypeImportData , foxit.pdf.actions.Action.Type.e_TypeRendition . |