SetFormFieldAction
表单域、注释和热点链接
描述
把现有操作字典绑定到表单字段触发器
语法
Delphi
Function TPDFlib.SetFormFieldAction(Index: Integer; Const ActionType: WideString; ActionID: Integer): Integer;
DLL
int DLSetFormFieldAction(int InstanceID, int Index, const wchar_t * ActionType, int ActionID);
参数
| Index | 从 1 开始的表单字段索引 |
|---|---|
| ActionType | 触发器名称:E、X、D、U、Fo、Bl、K、F、V 或 C |
| ActionID | 由 GetAnnotActionID、GetOutlineActionID 或 GetFormFieldActionID 返回的操作句柄 |
返回值
| 0 | 字段、触发器或操作句柄无效,或 PDF/X-6 模式处于激活状态 |
|---|---|
| 1 | 操作已复制并指派给字段触发器 |
说明
操作字典在指派给字段之前会先复制到选定文档中,因此之后对原始操作的编辑不会改变字段触发器 对主鼠标抬起激活操作使用
ActionType U,与 GetFormFieldActionID(Index, 'U') 读取的操作一致
使用
RemoveFormFieldAction 清除触发器,使用 GetFormFieldActionInfo 通过 TPDFlibActionInfo 检查已指派的操作