简体   繁体   English

使用Acrobat Javascript为PDF分配唯一的合同编号

[英]Assign unique contract number to PDF using Acrobat Javascript

Interesting problem: I want our sales staff of 3 to use the same master PDF (strictly on our own server from within our intranet) to create a unique document set for each client of our business, which document set includes a contract. 有趣的问题:我希望我们的3名销售人员使用同一主PDF(严格地在Intranet内的我们自己的服务器上)为我们业务的每个客户创建唯一的文档集,该文档集包括合同。

A state regulator randomly audits our supply of contract forms, and assesses a fee for each missing contract, so the contracts must be sequentially numbered with no apparent gaps. 国家监管机构会随机审核我们提供的合同表格,并为每份缺失的合同评估费用,因此,合同必须按顺序编号,且没有明显的差距。 I want the "Finalize Contract" button in my PDF to run an Acrobat JavaScript that posts a request to a webservice written in PHP, which webservice should connect to a MySQL table, autoincrements the number in in question in the table, and return the value to the Acrobat JavaScript for assignment to the proper field. 我希望PDF中的“最终合同”按钮运行Acrobat JavaScript,该JavaScript将请求发布到用PHP编写的Web服务中,该Web服务应连接到MySQL表,自动增加表中有问题的数字,并返回值到Acrobat JavaScript,以分配给适当的字段。

I have done enough research to know what I want to do. 我已经做了足够的研究,知道我想做什么。 I am enough of a coding virgin to not know the nuts and bolts of how to do it. 我只是一个编码初学者,不知道如何做到这一点。 I can take PMs on this for an open dialogue off the board if you wish, just need to get it done. 如果您愿意,我可以请PM进行公开对话,只需要完成它即可。

You might want to have a look at JQuery and it's Ajax function for the part of retrieving PHP data from JavaScript: http://api.jquery.com/jQuery.get/ 您可能想看一下JQuery及其Ajax函数,以从JavaScript检索PHP数据: http : //api.jquery.com/jQuery.get/

Regarding the PHP part, you want to connect to a database and fetch and update some information. 关于PHP部分,您想连接到数据库并获取和更新一些信息。 This might help: http://de.php.net/manual/de/function.mysql-query.php 这可能会有所帮助: http : //de.php.net/manual/de/function.mysql-query.php

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

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