Re: [PHP-DB] PDF/FDF Support

2002-07-03 Thread Paul Burney

on 7/2/02 8:20 PM, Jefferson Cowart at [EMAIL PROTECTED] appended the
following bits to my mbox:

> I'm trying to write a PDF form that people can fill in. I want to then
> take the data, store it in my database, and then recall the data, and
> display a filled in form with that data. I see two options. The first is
> to have acrobat post the entire PDF file and store the entire file. This
> option seems to be to be a little bit of a waste as much of the data is
> the same (the form). The second option is to have it post FDF data and
> then later turn that around and put it back into a form for people to
> view. Does anyone know of any good documentation on how to do this with
> PDF files, PHP, and a DB backend?

The most accessible solution is to generate the PDF file with all of the
data filled in as text in the PDF.  That way, programs other than Acrobat
Reader can view the PDF file.

If you have your PHP module compiled with FDF support, you can read this
page for more info:



If you don't have that, it is fairly straightforward to make an FDF document
by hand with PHP.  I put up a sample at:



Basically, though, you want to do the following:

1) Use Acrobat to create the PDF fill in document, using reasonable variable
names (probably your database field names)

2) Write a PHP file that does something like:

 - Output the correct FDF header
 - Output the standard beginning FDF stuff
 - Put the database data into the the /T and /V fields
 - Set the /F value as the URL of your pdf fill-in.
 - Output the standard ending FDF stuff

Caveats:

Acrobat Reader must be installed as a web plugin (i.e., opening the document
in the browser) and it must be set to handle the FDF type.  This may be the
default case in Windows, but I know from experience that it is a PITA on old
Macs.

Hope that helps.

Sincerely,

Paul Burney






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] PDF/FDF Support

2002-07-02 Thread Jefferson Cowart

I'm trying to write a PDF form that people can fill in. I want to then
take the data, store it in my database, and then recall the data, and
display a filled in form with that data. I see two options. The first is
to have acrobat post the entire PDF file and store the entire file. This
option seems to be to be a little bit of a waste as much of the data is
the same (the form). The second option is to have it post FDF data and
then later turn that around and put it back into a form for people to
view. Does anyone know of any good documentation on how to do this with
PDF files, PHP, and a DB backend?


Thanks
Jefferson Cowart
[EMAIL PROTECTED] 

Support Open Instant Messaging Protocols
http://www.petitiononline.com/openIM/petition.html


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php