将pdf表单字段提交到HTTP POST请求。

时间:2022-11-23 17:56:13

I've made a pdf form in Adobe Acrobat. Now I want to make a button that submits the form to a HTTP POST request. I have searched for about 4 hours, but I have not found an example to do this.

我在adobeacrobat中制作了pdf格式的表格。现在我想创建一个按钮,将表单提交到HTTP POST请求。我已经搜索了大约4个小时,但是我没有找到这样做的例子。

Here I read that it is possible to send the pdf form fields with a HTTP submission, but there's also no example given: http://acrobatusers.com/tutorials/form-submit-e-mail-demystified

在这里,我看到可以发送带有HTTP提交的pdf表单字段,但是也没有给出示例:http://acrobatusers.com/tutorials/form-submit-e-mail-demystified

I'm looking for a JavaScript example that I can link to the submit button.

我正在寻找一个可以链接到submit按钮的JavaScript示例。

1 个解决方案

#1


10  

doc.submitForm(url, false);

or

doc.submitForm( url, null, null, null, null, null, null, null, null, null
                null, null, null, null, null, "HTML" );

submitForm actually takes 23 different parameters, the above is only using 16 of them. And if I miscounted, I'm trying to use the cSubmitAs parameter.

submitForm实际上有23个不同的参数,上面只使用了其中的16个。如果我算错了,我试着使用cSubmitAs参数。

This from the JavaScript API reference, which can be found at... lets see... right here. Enjoy.

这个来自JavaScript API引用,可以在…让我们看看…在这里。享受。

PS: "this" is almost universally the document in acrobat events. event.target might be a field or something, but "this" is going to be the document.

PS:“this”几乎是acrobat事件中的通用文档。事件。target可能是一个字段,但“this”将是文档。

PPS: Things like bEmpty, aFields, and various other parameters don't work when bFDF = false.

当bFDF = false时,bEmpty、aFields和其他各种参数都不起作用。

#1


10  

doc.submitForm(url, false);

or

doc.submitForm( url, null, null, null, null, null, null, null, null, null
                null, null, null, null, null, "HTML" );

submitForm actually takes 23 different parameters, the above is only using 16 of them. And if I miscounted, I'm trying to use the cSubmitAs parameter.

submitForm实际上有23个不同的参数,上面只使用了其中的16个。如果我算错了,我试着使用cSubmitAs参数。

This from the JavaScript API reference, which can be found at... lets see... right here. Enjoy.

这个来自JavaScript API引用,可以在…让我们看看…在这里。享受。

PS: "this" is almost universally the document in acrobat events. event.target might be a field or something, but "this" is going to be the document.

PS:“this”几乎是acrobat事件中的通用文档。事件。target可能是一个字段,但“this”将是文档。

PPS: Things like bEmpty, aFields, and various other parameters don't work when bFDF = false.

当bFDF = false时,bEmpty、aFields和其他各种参数都不起作用。