0

I start with dynamic data, and an empty PDF file to be filled. How could I fill up the pdf using the dynamic data ?


EDIT : I found a way to fill up the pdf with FPDF.org and a plugin.

  1. First, add form fields to your PDF using softwares such as Acrobat Pro or LiveCycle, and prepare the PDF online or offline using PDFtk : pdftk modele.pdf output modele2.pdf
  2. Place data into arrays and fill the pdf with JS following the plugin instructions

Here it is, we get our PDF filled!

Now, I just need to flatten the form, in order to prevent the user to change the field options. Is there a way to do it, using either FPDF or PDFlib which is installed on my shared host?

Yako
  • 3,405
  • 9
  • 41
  • 71

1 Answers1

0

You can use pdftk to do that. eg.

pdftk form.pdf fill_form data.fdf output out.pdf flatten

or:

pdftk form.filled.pdf output out.pdf flatten
neubert
  • 15,947
  • 24
  • 120
  • 212
  • Unfortunately, pdftk can not be installed on my shared host. I can only rely on PDFlib, or any PHP based script... – Yako Apr 26 '13 at 14:49