Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

FDF Support in PHP
How it works
Adobe has developed the portable document format (PDF) and extended it over the last years. One of these extensions are Acrobat Forms which allow a user to input data and send it to the server where it is evaluated, just as HTML forms. Such a PDF document is very similar to a static PDF document, but when you look at it with the Acrobat Reader, you will find areas which can be edited.
There are many input fields available just like in HTML, e.g. a submit and reset button, text input fields, check boxes etc.. Creating such a PDF form requires Acrobat Exchange 3.x or the new Acrobat 4 software, which unfortunately only runs on Windows and MacOS. Both provide a mode to place the different input fields into an existing PDF document. The submit button carries an attribute which specifies the URL to call when it is pressed. This is very similar to HTML, but can differ in the format when the entered data is transfered to the server. Data from HTML forms is transfered using a certain syntax which can be observed in the URL after hitting the submit button. Acrobat Forms support this format, but also FDF (Form Data Format).
FDF is a new format which requires the FDF Toolkit (current version is 4.0) to parse. If PHP has FDF support compiled, it can parse FDF data and access any field by its name. FDF data is currently stored by PHP in the variable HTTP_RAW_POST_DATA (just as HTML data is stored in HTTP_POST_DATA). The actual evaluation of the data has to be done in the PHP script, as opposed to the HTML post data which is evaluated by the PHP engine.
To get an impression of what the FDF data looks like, here is an example:
%FDF-1.2 %âãÏÓ 1 0 obj << /FDF << /Fields [ << /V (This is just some text for testing)/T (comment)>> ....
It is just the first portion of a complete record, but one should be able to clearly identify the input field comment and its value. Here is text for testing.
[ Next Page ]

[Page 1]  [Page 2]  


Comments:
RE: How about submitting HTML form to PDF?Movses Kiredjian07/25/07 06:43
using fdf for loading image dynamicallybosheng06/27/05 12:38
Error Messages kim07/20/04 12:55
RE: Add data to an existing PDF and print it Pinoy05/18/03 22:10
RE: WORD.DOC to PDFCharles12/10/02 22:57
RE: Enabling FDF support in PHPMaleMan11/04/02 06:06
nice tool to convert html to pdfDavid Feliu10/13/02 05:54
WORD.DOC to PDFstash09/20/02 11:54
submit forms across a networkChris09/07/02 00:25
FDF and IEAbhijit08/12/02 12:19
PDF/FDF and PHPPete Maguire08/07/02 12:26
Add data to an existing PDF and print it out?Jo Hammerstein08/07/02 10:28
RE: use fdf files with Access?Dharmendra Sharma08/02/02 22:36
comment generer du pdf à partir rachid08/01/02 05:06
RE: FDF, PHP, multi page documentAnurag Verma07/12/02 05:57
RE: Looking for tools for creating pdf formsRick Holbert07/10/02 10:01
RE: fdf_open failsAbhijit07/04/02 20:49
RE: problem with pdf_open()Dean Grant05/28/02 10:35
Looking for tools for creating pdf formsjbv05/27/02 16:23
Again about Enabling FDF support in PHPMarco05/25/02 08:33
Is it possible to publish FDF data to HTML?Mike04/29/02 11:29
RE: FDF, PHP, multi page documentsowmya04/26/02 01:26
use fdf files with Access?ERRESSE04/13/02 15:55
RE: Internet Explorer and PDF/FDFAndré04/03/02 11:05
RE: Internet Explorer and PDF/FDFNed Wolfenbarger04/02/02 17:33
RE: Internet Explorer and PDF/FDFgreg greenhaw04/01/02 15:44
RE: FDF, PHP, multi page documentMario Rui02/14/02 11:12
RE: Internet Explorer and PDF/FDFDave Turnbull01/17/02 16:41
Filling PDFs - FDF or JavascriptGreg Greenhaw12/27/01 19:34
FDF & JavascriptGreg Greenhaw12/27/01 19:29
RE: fdf_open failsJoe Mainolfi11/13/01 16:34
Configuring PHP and FDFJoe Mainolfi11/12/01 12:54
Where data sent are stored?Enzosan10/09/01 06:49
RE: Enabling FDF support in PHPChristopher Chan09/21/01 04:31
fdf_open failsomprakash09/08/01 12:22
$HTTP_RAW_POST_DATA is emptyDavid08/09/01 11:07
FDF, php 4.0.6 (cgi/isapi), windows 2000, ii5Hans Soeharso08/06/01 11:53
RE: how to subit html form to php?Jim Henderson06/25/01 13:19
how to subit html form to php?thamilselvan06/18/01 22:14
Enabling FDF support in PHPMark Anderson06/13/01 05:49
fdf in jsp ...sanjeev04/27/01 07:43
Wrong version?Michael A. Peters02/26/01 16:35
RE: Adobe's files don't workJohn Gerstenslager02/19/01 07:27
FDF, PHP, multi page documentwilfrid gaboriaud02/19/01 05:53
Adobe's files don't workJohn Gerstenslager02/18/01 19:37
RE: How about submitting HTML form to PDF?Oliver Klink02/08/01 04:20
RE: How about submitting HTML form to PDF?Erick Schmidt01/26/01 13:00
RE: generating PDF from common document formaMax Wyss01/07/01 17:18
RE: How about submitting HTML form to PDF?Max Wyss01/07/01 17:07
problem with pdf_open()Alf Magne Kalleland01/04/01 08:13
Examples don't work with blank fieldsGirvan Bell12/14/00 07:23
The examples are brokenalain12/09/00 01:13
RE: Internet Explorer and PDF/FDFalain12/09/00 01:01
Internet Explorer and PDF/FDFGirvan Bell12/04/00 07:18
how to check pdf file width and height in phpricky12/02/00 05:23
RE: How about submitting HTML form to PDF?Adam11/30/00 15:15
RE: generating PDF from common document formaRick Holbert11/29/00 14:30
More PHP/PDFJohn Gallagher11/22/00 03:57
FDF not writing filesChad W. Skinner11/21/00 14:47
FDF & NN6Antonio Cavedoni11/21/00 11:57
generating PDF from common document formatsBen Munoz11/20/00 22:14
RE: How about submitting HTML form to PDF?Jon Busch11/20/00 21:37
Thanks for the exampleJefferey Garrett11/17/00 12:24
How about submitting HTML form to PDF?Rex Byrns11/17/00 10:43
Your examples don't workChester Bullock11/17/00 09:55
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.