我正在尝试在 Firefox 浏览器中使用 adobe 插件在 pdf 表单中添加签名。 我的代码无法与 Adobe Reader 配合使用并显示此错误 “NotAllowedError:安全设置阻止访问此属性或方法。”
function addSignature(image){
try {
app.alert("add image");
this.createDataObject({cName: "my_signature", cValue: image});
oFile = util.streamFromString( image, "utf-8");
this.setDataObjectContents("my_signature", oFile);
this.submitForm({
cURL: VIS_SIGN_SERVER_URL , // + "#FDF",
cSubmitAs: "PDF" // the default, not needed here
});
} catch (e) {
app.alert(e);
}
}
但是当我安装了 Adobe Pro 后,它就可以正常工作了。 即使我阅读了文档并搜索了这个问题,我也无法找到使其在 Adobe Reader 中运行的解决方案,也找不到任何表明无法在 Adobe Reader 中实现而只能在 Adobe Pro 中实现的文档。
预先感谢您!
请您参考如下方法:
根据 Adobe® Acrobat® DC SDK 中的 JavaScript™ for Acrobat® API 引用:
其中第四列中的 D 定义为:
The property or method is allowed in Acrobat Pro and Acrobat Standard. It can be accessed in Adobe Reader (version 5.1 or later) depending on additional usage rights that have been applied to the document:
...
● D — Requires file attachment rights
因此,您显然必须为您的 PDF 启用 Adobe-Reader(应用使用权限)才能使其在 Adobe Reader 中运行。