如何处理在服务器上输入交互式 PDF 表单的值?

发布于 2024-08-09 15:25:53 字数 256 浏览 3 评论 0原文

客户询问如何创建交互式 PDF 表单,该表单具有允许在服务器上处理表单中输入的值的功能。

据我所知,执行此操作的最佳方法是通过 Acrobat 将 javascript 嵌入到 PDF 文件中来对提交进行编程,然后在服务器端编写代码来处理提交。

有没有人有做这类事情的经验?最好的方法确实是通过在 pdf 文件中使用 javascript 并将表单值发布到服务器端表单处理方法吗?

如果这样做,有什么方法可以将值传回表单已成功处理的 PDF 文件吗?

A client is asking how to create an interactive PDF form with functionality that allows the values entered into the form to be processed on the server.

From what I've read, the best way to do this is to program the submission by embedding javascript into the PDF file via Acrobat, then writing code on the server side to handle the submission.

Does anyone have experience doing this sort of thing? Is the best way to do this indeed by using javascript in the pdf file and using that to post the form values to the server-side form processing method?

If you do that, is there any way to pass back values to the PDF file that the form processed successfully?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

萧瑟寒风 2024-08-16 15:25:54

我们使用了 ceTE 软件的 DynamicPDF 查看器。
http://www.cete.com/

We have used the DynamicPDF viewer from ceTE software.
http://www.cete.com/

黯然 2024-08-16 15:25:54

如果需求只是从 PDF 表单字段中提取数据,则不一定需要 JavaScript。 Javascript 当然可以与表单字段一起使用来处理某些要求(通常是自动计算和验证),但对于仅设置和获取数据来说可能有点过头了。

有些 API 可以非常轻松地从 PDF 表单字段设置和获取数据。 EasyPDF SDK 就是一个这样做的工具包,它有一个 PDFDocument 类,正是为此而设计的:

 http://www.pdfonline.com/easypdf/epsdk_manual/index.htm?page=reference%2Fpdfdocumentsdk%2Fpdfdocument%2Fdescription.htm

它是否能满足您的需求将在很大程度上取决于 PDF 是否已经创建。如果已经创建了可填写的表单字段,则可以使用 EasyPDF SDK 从字段中读取数据并将数据插入其中。但如果您尚未创建 PDF 模板,则需要先使用 Acrobat Professional 等 Adob​​e 工具来完成此操作。

我声明我是 EasyPDF SDK 工程团队的一员,因此我对该工具拥有既得利益。但它非常漂亮且易于使用,并且适合服务器端部署,因此请随时访问 http:// www.pdfonline.com 如果您愿意的话。希望这有帮助。

If the requirement is just to pull data out of PDF form fields, Javascript may not necessarily be required. Javascript can certainly be used with form fields to handle certain requirements (oftentimes auto-calculation and validation), but it might be overkill for just setting and getting data.

There are APIs that will set and get data from PDF form fields pretty easily. One toolkit that does so is EasyPDF SDK, which has a PDFDocument class designed for exactly this:

 http://www.pdfonline.com/easypdf/epsdk_manual/index.htm?page=reference%2Fpdfdocumentsdk%2Fpdfdocument%2Fdescription.htm

Whether it will work for your needs will depend largely on whether the PDF has already been created or not. If it's already been created with fillable form fields, then EasyPDF SDK can be used to read data from the fields and insert data into them. But if you don't have the PDF template created yet, then you'd need Adobe tools like Acrobat Professional to do that first.

I will disclaim that I am part of the engineering team for EasyPDF SDK, so I have a vested interest in the tool. But it's nifty and easy to use, and is geared for server side deployment, so feel free to check it out at http://www.pdfonline.com if you feel so inclined. Hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文