简体   繁体   English

使用可填写的表单字段来操作pdf表单,并使其保持可被用户填充?

[英]manipulate pdf form with fill-able form fields and keep them fillable by user?

I got a form with fill-able form fields made by Acrobat, it is rather complex. 我有一个表格,其中包含Acrobat制作的可填写表格字段,这相当复杂。 Via PHP I want to "simply" attach another page, add a barcode to the form page and add meta info. 通过PHP,我想“简单地”附加另一个页面,将条形码添加到表单页面并添加元信息。

Currently I do not manage to retain the fields fill-able or tcpdf/fpdi simply cannot read the compression of the pdf. 目前,我无法保留可填充字段,或者tcpdf / fpdi根本无法读取pdf压缩文件。 I tried a couple of different pdf version but don't succeed so far. 我尝试了几种不同的pdf版本,但到目前为止没有成功。

I tried pdflib but work now with tcpdf and fpdi, however there seems no way to make it happen. 我尝试了pdflib,但是现在可以使用tcpdf和fpdi,但是似乎没有办法实现它。 I can attach pdf files and use templates, just not in any format that has or retains fill-able fields. 我可以附加pdf文件并使用模板,但不能采用具有或保留可填写字段的任何格式。

  1. Is tcpdf/fpdi able to do this at all? tcpdf / fpdi完全可以做到这一点吗?
  2. Do you know of any other solution to achieve this? 您知道实现此目的的任何其他解决方案吗? (PHP/linux based) (基于PHP / Linux)

What you want to do is not possible. 您想做什么是不可能的。

Adobe uses an own proprietary way to create and fill PDF forms. Adobe使用自己的专有方法来创建和填写PDF表单。 Adobe Reader does only support to fill PDF forms... Adobe Reader仅支持填写PDF表单...

  • ...which were created by an Adobe product and ...由Adobe产品和
  • ...which have been assigned 'extended rights' so Reader can indeed save the formdata alongside the document. ...已被赋予“扩展权限”,因此Reader确实可以将formdata与文档一起保存。

There are a number of methods, utilities, tools and programs to create and fill PDF forms nevertheless: Scribus, iText, pdflib, tcpdf, pdftk, Foxit, XSL FO, OpenOffice.org or LibreOffice and more... However, Adobe Readers will refuse to fill+save form data with documents created by these means. 尽管如此,仍有许多方法,实用程序,工具和程序可以创建和填写PDF表单:Scribus,iText,pdflib,tcpdf,pdftk,Foxit,XSL FO,OpenOffice.org或LibreOffice等。 但是,Adobe Readers会拒绝使用通过这些方式创建的文档填充+保存表单数据。

The technical mechanism behind this is: Adobe digitally sign their form documents with their own key. 其背后的技术机制是:Adobe用自己的密钥对表单文档进行数字签名。 This key is known to the Adobe Reader and all Adobe Products. 此密钥是Adobe Reader和所有Adobe产品已知的。 And you agreed to not reverse engineer that key when you accepted the Adobe Reader EULA.... -- 并且您同意在接受Adobe Reader EULA时不对该密钥进行反向工程。

This means: 这意味着:

  • Most non-Adobe PDF Readers will not be able to 'fill+save' forms created with Adobe products (they can 'fill+print' them however), unless they may have licensed from Adobe said signature key. 除非非Adobe PDF Reader可能已获得Adobe所述签名密钥的许可,否则大多数非Adobe PDF Reader都将无法“填充+保存”使用Adobe产品创建的表格(但是他们可以“填充+打印”它们)。
  • Adobe PDF readers will refuse to 'fill+save' forms created with non-Adobe products (they will 'fill+print' them however). Adobe PDF阅读器将拒绝“填充+保存”使用非Adobe产品创建的表格(但是,他们将“填充+打印”它们)。

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

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