|
Foxit PDF SDK
|
构造函数 | |
| (FSPDFDictionary *) | - getDict |
| 获取当前对象的PDF字典。 更多... | |
| (FSPDFDoc *) | - getDocument |
| 获取当前动作所属的PDF文档。 更多... | |
| (FSAction *) | - getSubAction: |
| 按索引获取子动作。 更多... | |
| (int) | - getSubActionCount |
| 获取子动作的数量。 更多... | |
| (FSActionType) | - getType |
| 获取动作类型。 更多... | |
| (id) | - initWithAction: |
| 构造函数,使用另一个动作对象。 更多... | |
| (id) | - initWithDocument:action_dict: |
| 构造函数,带参数。 更多... | |
| (void) | - insertSubAction:sub_action: |
| 在指定索引位置插入新的子动作。 更多... | |
| (BOOL) | - isEmpty |
| 检查当前对象是否为空。 更多... | |
| (void) | - removeAllSubActions |
| 移除所有子动作。 更多... | |
| (void) | - removeSubAction: |
| 移除指定索引的子动作。 更多... | |
| (void) | - setSubAction:sub_action: |
| 按索引设置子动作。 更多... | |
类方法 | |
| (FSAction *) | + create:action_type: |
| 为指定的动作类型创建新动作。 更多... | |
PDF支持以下标准动作类型:
"转到动作"、"远程转到动作"、"嵌入转到动作"、"启动动作"、"线程动作"、 "URI动作"、"声音动作"、"电影动作"、"隐藏动作"、"命名动作"、"提交表单动作"、 "重置表单动作"、"导入数据动作"、"JavaScript动作"、"设置OCG状态动作"、 "演示动作"、"过渡动作"、"转到3D视图动作"。
PDF动作可能有子动作。当此动作被触发时,其子动作也应依次被触发。
类FSAction 是所有类型PDF动作的基类。对于具体的动作类型,请参考 派生类。函数FSAction::create:action_type:可用于创建新动作 – 目前仅支持 某些动作类型。请参考此函数的注释以获取更多详细信息。此类还提供了修改子动作的函数。
| + (FSAction *) create: | (FSPDFDoc*) | document | |
| action_type: | (FSActionType) | action_type | |
为指定的动作类型创建新动作。
新创建的动作尚未有动作数据(除了动作类型)。 用户需要调用具体动作类中的函数来设置动作数据。
| [in] | document | 新动作所属的有效PDF文档。 |
| [in] | action_type | 动作类型,用于指定要创建的动作类型。 目前仅支持: FSActionTypeGoto、FSActionTypeURI、 FSActionTypeJavaScript、FSActionTypeNamed、 FSActionTypeGoToR、FSActionTypeGoToE、 FSActionTypeSubmitForm、FSActionTypeResetForm、 FSActionTypeHide、FSActionTypeLaunch、 FSActionTypeImportData、FSActionTypeRendition、 FSActionTypeSetOCGState、FSActionTypeThread, |
| - (FSPDFDictionary *) getDict |
获取当前对象的PDF字典。
| - (FSPDFDoc *) getDocument |
获取当前动作所属的PDF文档。
| - (FSAction *) getSubAction: | (int) | index |
按索引获取子动作。
| [in] | index | 要检索的子动作的索引。有效范围:从0到(count-1)。 count由函数FSAction::getSubActionCount返回。 |
| - (int) getSubActionCount |
获取子动作的数量。
| - (FSActionType) getType |
获取动作类型。
| - (id) initWithAction: | (FSAction*) | action |
构造函数,使用另一个动作对象。
| [in] | action | 另一个动作对象。 |
被 FSRenditionAction, FSSetOCGStateAction, FSLaunchAction, FSResetFormAction, FSSubmitFormAction, FSRemoteGotoAction, FSNamedAction , 以及 FSURIAction 重载.
| - (id) initWithDocument: | (FSPDFDoc*) | document | |
| action_dict: | (FSPDFDictionary*) | action_dict | |
构造函数,带参数。
| [in] | document | 有效的PDF文档对象。 |
| [in] | action_dict | 表示动作的PDF字典对象。 |
| - (void) insertSubAction: | (int) | index | |
| sub_action: | (FSAction*) | sub_action | |
在指定索引位置插入新的子动作。
| [in] | index | 要插入新子动作的位置索引。 如果此索引值小于零,新子动作将被插入为第一个。 如果此索引值等于或大于当前子动作数量,新子动作将 被插入为最后一个。 |
| [in] | sub_action | 要插入的新子动作。当前仅支持以下类型 作为新子动作: FSActionTypeGoto,FSActionTypeURI, FSActionTypeJavaScript,FSActionTypeNamed, FSActionTypeGoToR,FSActionTypeGoToE, FSActionTypeSubmitForm,FSActionTypeResetForm, FSActionTypeHide,FSActionTypeLaunch, FSActionTypeImportData,FSActionTypeRendition。 |
| - (BOOL) isEmpty |
检查当前对象是否为空。
当当前对象为空时,意味着当前对象无用。
| - (void) removeAllSubActions |
移除所有子动作。
| - (void) removeSubAction: | (int) | index |
| - (void) setSubAction: | (int) | index | |
| sub_action: | (FSAction*) | sub_action | |
按索引设置子动作。
| [in] | index | 要检索的子动作的索引。有效范围:从0到(count-1)。 count由函数FSAction::getSubActionCount返回。 |
| [in] | sub_action | 要设置为子动作的动作对象。目前仅支持以下类型 作为子动作: FSActionTypeGoto、FSActionTypeURI、 FSActionTypeJavaScript、FSActionTypeNamed、 FSActionTypeGoToR、FSActionTypeGoToE、 FSActionTypeSubmitForm、FSActionTypeResetForm、 FSActionTypeHide、FSActionTypeLaunch、 FSActionTypeImportData、FSActionTypeRendition、 FSActionTypeSetOCGState。 |