简体   繁体   English

尝试提交带有签名图像的 PDF 表单

[英]Trying to submit PDF form with the image of the signature

I am trying to add a signature in pdf forms using adobe plugins in firefox browser.我正在尝试在 Firefox 浏览器中使用 adobe 插件在 pdf 表单中添加签名。 My code is not working with Adobe Reader and is showing this error "NotAllowedError: Security settings prevent access to this property or method."我的代码不适用于 Adob​​e 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);
    }
}

But when I have Adobe Pro installed it works perfectly.但是当我安装了 Adob​​e Pro 时,它可以完美运行。 Even why I have read the documentation and search for this problem I cannot find the solution to make it works in Adobe Reader or any documentation that shows that it is not possible to do in Adobe Reader but only in Adobe Pro.即使我阅读了文档并搜索了这个问题,我也找不到使其在 Adob​​e Reader 中工作的解决方案,或者任何表明在 Adob​​e Reader 中无法执行而只能在 Adob​​e Pro 中执行的文档。

Thank You In Advance!先感谢您!

According to the JavaScript™ for Acrobat® API Reference from the Adobe® Acrobat® DC SDK:根据来自 Adob​​e® Acrobat® DC SDK 的 JavaScript™ for Acrobat® API 参考:

createDataObject |5.0|D||D|

setDataObjectContents |7.0|||D|

where the D in the fourth column is defined to mean:其中第四列中的D定义为:

The property or method is allowed in Acrobat Pro and Acrobat Standard. Acrobat Pro 和 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:它可以在 Adob​​e Reader(5.1 版或更高版本)中访问,具体取决于已应用于文档的其他使用权限:

... ...

● D — Requires file attachment rights ● D — 需要文件附件权限

Thus, you apparently will have to Adobe-Reader-enable your PDF (apply usage rights) to make it work in Adobe Reader.因此,您显然必须启用 Adob​​e-Reader 才能使您的 PDF(应用使用权限)能够在 Adob​​e Reader 中运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM