0

I am currently creating a site where the user would fill out a form and upon clicking submit button.

  • The data entered by the user will both be sent to a database and used to fill-out the pdf version of the form.

  • This pdf version of the form will then be downloaded to the user's browser.

  • I've been searching for 2 days on how to do this, and I've come across PDFTK but the problem is I'll be hosting this site on a webhost and as far as I understand, you cannot install PDFTK on a shared server.

  • I'm only looking at free webhosts here. I've already written the php for saving to the database, I just can't figure out the pdf part.

Any suggestions on how I can accomplish this? Thanks in advance

Jeen Broekstra
  • 21,642
  • 4
  • 51
  • 73
  • There are PDF libraries that you can download and include in your project, without having to install an extension for PHP. http://sourceforge.net/projects/tcpdf/?source=pdlp – Gregor Menih Apr 16 '14 at 11:13
  • I've been looking at different libraries from sourceforge.net and they all seem to be creating pdfs from scratch. Can you recommend a library that would fill-out an existing pdf form? Thanks! – carlom000 Apr 17 '14 at 13:31
  • Besides PDFtk, I can't think of any. – Gregor Menih Apr 17 '14 at 14:18
  • If a library is used, iText should be able to fill out, but I may be wrong on that. It may, however, be worthwile considering a commercial product, in particular FDFMerge by Appligent. This software is made for running on servers (you may have to try out whether it works for you), and does actually fill out the form. It uses the PDF-native forms format (FDF), which is, however not too difficult to create from a database. What you spend more on software, you will more than save in integration. – Max Wyss Apr 17 '14 at 14:42

0 Answers0