Foxit PDF SDK
|
Instance Methods | |
(BOOL) | - doJSAction: |
Perform javascript action which is specified by a trigger event type. More... | |
(FSAction *) | - getAction: |
Get an action with specified trigger event type. More... | |
(FSPDFDictionary *) | - getDict |
Get the PDF dictionary of current object. More... | |
(id) | - initWithAnnot: |
Constructor, from a PDF annotation. More... | |
(id) | - initWithDoc:pdf_dict: |
Constructor, from a PDF document or a PDF dictionary (if any). More... | |
(id) | - initWithField: |
Constructor, from a PDF form field. More... | |
(id) | - initWithOther: |
Constructor, with another additional action object. More... | |
(id) | - initWithPage: |
Constructor, from a PDF page. More... | |
(BOOL) | - isEmpty |
Check whether current object is empty or not. More... | |
(BOOL) | - removeAction: |
Remove an action with specified trigger event type. More... | |
(BOOL) | - removeAllActions |
Remove all actions. More... | |
(void) | - setAction:action: |
Set a additional-action for specified trigger event type. More... | |
An annotation, page object, or (beginning with PDF 1.3) interactive form field may include an entry named "AA" which specifies an additional-actions dictionary (PDF 1.2) that extends the set of events that can trigger the execution of an action. In PDF 1.4, the document catalog dictionary may also contain an "AA" entry for trigger events affecting the document as a whole.
This class can be constructed from PDF document, PDF page, PDF form field, PDF annotation (only some types) or an existing additional-actions dictionary and can be used to get/set data from an additional-actions dictionary from PDF document, PDF page, PDF form field or PDF annotation.
- (BOOL) doJSAction: | (FSAdditionalActionTriggerEvent) | trigger |
Perform javascript action which is specified by a trigger event type.
If current object is constructed with a valid PDF dictionary, current function will return NO directly because Foxit PDF SDK cannot know which kind of object the additional action dictionary is associated with.
[in] | trigger | The input trigger event type. It should be:
|
- (FSAction *) getAction: | (FSAdditionalActionTriggerEvent) | trigger |
Get an action with specified trigger event type.
[in] | trigger | The input trigger event type. It should be:
|
- (FSPDFDictionary *) getDict |
Get the PDF dictionary of current object.
- (id) initWithAnnot: | (FSAnnot*) | annot |
Constructor, from a PDF annotation.
[in] | annot | A valid PDF annotation. Currently, only support widget and screen annotation. For other types of annotations, this function will throw exception FSErrUnsupported. |
- (id) initWithDoc: | (FSPDFDoc*) | doc | |
pdf_dict: | (FSPDFDictionary*) | pdf_dict | |
Constructor, from a PDF document or a PDF dictionary (if any).
[in] | doc | A valid PDF document object. |
[in] | pdf_dict | A PDF dictionary which represents an additional action dictionary. If this parameter is nil, that means just to construct an Additional action object with PDF document. If this parameter is not nil, that means to construct an Additional action object from this PDF dictionary should have existed in the specified PDF document and represents the additional action dictionary. |
- (id) initWithField: | (FSField*) | field |
Constructor, from a PDF form field.
[in] | field | A valid PDF form field. |
- (id) initWithOther: | (FSAdditionalAction*) | other |
Constructor, with another additional action object.
[in] | other | Another additional action object. |
- (id) initWithPage: | (FSPDFPage*) | page |
Constructor, from a PDF page.
[in] | page | A valid PDF page object. |
- (BOOL) isEmpty |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
- (BOOL) removeAction: | (FSAdditionalActionTriggerEvent) | trigger |
Remove an action with specified trigger event type.
If there is no action for input trigger event type when it is valid, this function will return YES directly.
[in] | trigger | The input trigger event type. It should be:
|
- (BOOL) removeAllActions |
Remove all actions.
- (void) setAction: | (FSAdditionalActionTriggerEvent) | trigger | |
action: | (FSAction*) | action | |
Set a additional-action for specified trigger event type.
[in] | trigger | The input trigger event type. It should be:
|
[in] | action | An action object to be set. If current additional-action is constructed from PDF document or PDF form field, the type of this action should be FSActionTypeJavaScript. If current additional-action is constructed from PDF page, PDF annotation, or PDF dictionary, please refer to comment of the trigger event to check if only specified type of action can be used. Usually, support following types as the new action: FSActionTypeGoto, FSActionTypeURI, FSActionTypeJavaScript, FSActionTypeNamed, FSActionTypeGoToR, FSActionTypeGoToE, FSActionTypeSubmitForm, FSActionTypeResetForm, FSActionTypeHide, FSActionTypeLaunch, FSActionTypeImportData, FSActionTypeRendition. |