Monday, July 28, 2008

Creating PDFs through PHP

I have some experience using PDFs through a website. What we basically did was take an application, run it through an FDF generator and the results could be shown through a PDF.

How does that work? Well the FDF just stores the data for the input fields in the PDF.

There are so many problems with doing it this way though. The first being that Adobe no longer supports FDFs through their newest versions. Another is that we went through revisions in the application form in what information we took and stored. This meant that any changes in the PDF would alter the information the original FDF had stored. Thirdly, to keep the changes disparate between revisions, we would have to make a copy of the PDF, edit it, and tie all the new FDFs to the new PDF. Great, another 100+MB file to have to store.

What kept me from changing that? The company wanted to keep the PDF format for layout in printing.

What will be the solution (has not been implemented yet) is to generate real PDF's to store the information. That way the original information is preserved in the way that it was created. The tool I found for doing that is TCPDF. One of the best things I have seen about this tool is a large amount of updates. In the past couple weeks, there have already been more than 5 updates. You just gotta love that support.

I have already installed it and tested out the demos and it seems to work fantastically. The next step is to actually implement it.

I think I'll post up some more PHP tools that I like later. Please comment in on ones that you find useful or ones that you hate.

No comments:

Post a Comment