Change PDF forms from a PHP site

We are currently using PDForm to capture an empty PDF file (without values, just form and text fields) and list the form fields. Then we query our database for the values ​​corresponding to these field names, and create a pdf file with recently populated data that the user can download from our website. The fact is that PDForm is about $ 5,000 per machine, and we are migration servers. We need an alternative that is actively supported and recommended by the community.

I know that Zend is working on expanding PDF manipulation, but we need something fast. I tested using PDFtk, but the last update for this project was in 2006, and now it seems dead. This would be great, as it is open source, but it seems to cause errors with certain files that seem to be created using PDFPenPro (our creator of the PDF form).

Another solution I came up with was why it's not easy to use iText and write a java shell that accepts command line input so that PHP can call it using passthru () or exec (). There are other applications that will work if we completely rewrite our code, but we do not want to do this.

What do we need.

  • The ability of PHP to get PDF form field names
  • PHP, then to create an FDF file (then combine it with a PDF file) or send a line to a command-line application that will fill the fields with values ​​from our database.
  • Then the user can download the newly created PDF file with the filled form fields.

Am I moving in the writing direction by creating a java command line application that will use iText to parse and create the PDF files specified in PHP, or does anyone know of any cost effective alternatives?

+3
source share
4 answers

, , TCPDF , , PDFlib , iText, PDF, .

+1

TCPDF, , , .

+1

, d2burke, TCPDF. , OP, , pdf, 2 3 . TCPDF php, , , , .

! - ?

+1

I don’t know if another product can be considered “cost-effective”, the license cost of which varies from $ 1 thousand → $ 3 thousand, but PDFlib works very well. And if you don't need PPS functionality, it gets cheaper.

0
source

Source: https://habr.com/ru/post/1764090/


All Articles