#native_company# #native_desc#
#native_cta#

FDF Support in PHP

By Uwe Steinmann
on November 16, 2000

Motivation

Interaction on the WWW often means filling out forms, hitting the submit
button and getting a certain result. HTML and HTTP provide a mechanism to perform
this quite easily through forms. PHP has support for this
mechanism in a very convenient way. The
values of each input field are stored in PHP variables, with the same
name as the input field.
A mechanism quite similar has been developed by
Adobe, but for PDF documents. They simply
call it Acrobat Forms. From the users point of view, the only difference in HTML
forms and Acrobat forms is their appearance. The first one
uses HTML documents, while the second one uses PDF documents to present
the form.
For developers of web interfaces, Acrobat Forms can be handled
like HTML forms, if the form provides its input data as HTML forms. However, Adobe
has introduced a new format for form data called FDF (Form Data Format).
PHP already includes support for this format.
The possibility to
populate a PDF document with data, e.g. to customize it, is an additional feature of Acrobat Forms. .
Using PDF documents as forms and populating PDF documents with
data using PHP will be described in this article. Two examples demonstrate
how easy it is.
Before you start trying the online examples in this article
you should install the
Acrobat Reader Plug-in or use Acrobat 4. If you want to test the PHP scripts
on your own web server you will also need to install the
FDF Toolkit and
enable FDF support in PHP. Finally, if you want to develop your own PDF forms
you will need Acrobat Exchange 3.x or Acrobat 4.

1
|
2
|
3
|
4