SetPageActionMenu
页面属性
描述
指定文档首次打开时要运行的菜单项
这会写入带命名动作的页面附加动作字典(/AA)。页面 /AA 条目要求 PDF 1.5。若当前文档版本较低且未锁定保存版本,库会自动将文档提升至 PDF 1.5,并将 Page /AA (page triggers) 记录在 AutoBumpedFeatures 中。若调用方锁定较低保存版本,兼容性门控会以 LastErrorCode 602 拒绝保存
语法
Delphi
Function TPDFlib.SetPageActionMenu(Const MenuItem: WideString): Integer;
ActiveX
Function PDFlib::SetPageActionMenu(MenuItem As String) As Long
DLL
int DLSetPageActionMenu(int InstanceID, const wchar_t* MenuItem);
int DLSetPageActionMenuA(int InstanceID, const char* MenuItem);
参数
| MenuItem | 要调用的 MenuItem,例如 "Print" |
|---|
返回值
| 0 | 无法设置打开操作,文档存在问题 |
|---|---|
| 1 | 已成功设置页面打开操作 |