将pdf表单域提交给HTTP POST请求 [英] Submit pdf form fields to a HTTP POST request

查看:184
本文介绍了将pdf表单域提交给HTTP POST请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Adobe Acrobat制作了pdf表单。现在我想创建一个将表单提交给HTTP POST请求的按钮。我搜索了大约4个小时,但我还没有找到一个例子来做到这一点。



在这里,我读了可以发送PDF表单字段与HTTP提交,但也没有例子:
http://acrobatusers.com/tutorials/form -ubmit-e-mail-demystified



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

解决方案

  doc.submitForm(url,false); 

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

submitForm 实际上需要23个不同的参数,以上仅使用其中的16个。如果我误解了,我试图使用cSubmitAs参数。



从JavaScript API参考中可以找到...可以看到... 此处。享受。

PS:这个几乎全是acrobat事件中的文档。 event.target可能是一个字段或东西,但this将成为文档。



PPS:类似于 bEmpty aFields 以及其他各种参数在 bFDF = false 时不起作用。


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.

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

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

解决方案

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.

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

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.

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

这篇关于将pdf表单域提交给HTTP POST请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆