PHP and Adobe FDF/PDF

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to figure out how to do the following:

1. Upload an Adobe FDF to my server
2. read the field names out of the FDF into MySQL for future use
3. Generate an interview form based upon the fields read
4.  write a permanent pdf to the server populating the fields

I can do the upload, I can write to the database and I can generate a
dynamic interview form based upon the fields read.  The interaction
with an FDF and PDF are beyond me.  Can someone point me in the right
direction to start this?


Re: PHP and Adobe FDF/PDF

Matthew Speed wrote:
Quoted text here. Click to load it

I am assuming you have the FDF Toolkit installed on
your server and configured properly...

Quoted text here. Click to load it

OK, let's pretend for simplicity that the FDF transmits
only one field called 'info'.  So here's what you do:

$fdf = fdf_open_string($HTTP_FDF_DATA);
$info = mysql_escape_string(fdf_get_value($fdf, 'info'));
mysql_query("INSERT INTO sometable SET info='$info'");

Quoted text here. Click to load it

For a good reason, for there is none.  With FDF, all you
can do is manipulate pre-existing forms.  You cannot make
a permanent (i.e., formless) PDF, unless you generate the
PDF from scratch using whatever PDF generation facility
you have (PDFlib, ClibPDF, FPDF, whatever).  


Site Timeline