Sunday, April 5, 2009

Adode PDFs + PHP

Recently I have been doing a lot of PHP development. Integrating Adobe PDFs into websites for some corporate clients. Since they already have the PDF forms made, they wanted to have their end-users simply fill it in and submit to database.

This is a rather simple concept. I grabbed up the most recent version of the Adobe Suite which came with a nice program called Adobe Life Cycle ES. This allows you to add an HTML Submit button to the PDF form. Link the HTML Button to a PHP file that submits data and Done.

However this has limitations:
1) ...It is currently not possible to embed dynamic values into a PDF. Ie lets say you need to generate a PDF with a unique identifier in it...like a user id. You cant put it in the PDF.

Well thats kinda useless isnt it.

2) the HTTP Submit, does not submit any cookie values. Well this sort of makes sense...the HTTP Submit only submits the PDF Form and not the whole FORM page.

Cookies would have been useful to store data in...
I highly doubt that adobe will be supporting this feature. If we think about the PDF as a HTML page within an HTML page, the PDF does not have access to the browser's cookie storage (I think for various security reasons....) and therefor cannot actually do a page submit.

My Solution:
Yea its very hackish...but hey whatever works when your working with incomplete technology.

No comments:

Post a Comment