There are many ways to fill PDF files with data. This article should help you decide which solution works best for you. I will be adding many more options in the future.
FDF/XFDF
Using FDF/XFDF files is a clean and simple answer. These small files provide the data values to a standard PDF form file.
How it Works
When you open the FDF file, the original PDF form is loaded with the values in the FDF file. The original PDF file is downloaded from any web location.
Advantages
- Very easy to implement
- No third party libraries or applications required on the web server
- Free
- Filled out form files are small
- Form data is stored separately from the PDF form making spelling mistakes easy to fix
Disadvantages
- The original PDF must be web accessible
- Some PDF programs may not support the FDF format
- The PDF form must be created in a way that has named fields
Implementation
A great tutorial showing exactly how to produce FDF and XFDF files in native PHP code (no PECL extension or executable required)
http://koivi.com/fill-pdf-form-fields/
Advertisement