Populate online PDF forms with known data.
To maintain form data, you must display the current state of the data to the user. This enables the user to review the data, update a single field, and submit this change back to the server. With HTML forms, you can set field values as the form is served to the user. With PDF forms, you can use the Forms Data Format (FDF) to populate a form's fields with data.
The PDF Reference describes the FDF file format. Its syntax uses PDF objects Section 6.8 to organize data. To see an example, open your PDF form in Acrobat and fill in some fields. Export this data as FDF by selecting Advanced Forms Export Forms Data . . . (Acrobat 6) or File Export Form Data . . . (Acrobat 5). Our basic PDF form yields an FDF file that lists fields in name/value pairs and then references the PDF form by filename:
%FDF-1.2
1 0 obj
<< /FDF << /Fields [ << /T (text_field_1) /V (Here is some text) >>
<< /T (text_field_2) /V (More nice text) >> ]
/F (http://localhost/fine_form.pdf)
>>
>>
endobj
trailer
<< /Root 1 0 R >>
%%EOF
For XML fans, XFDF is an XML-based subset of FDF features. Acrobat Versions 5 and 6 support XFDF. Its MIME type is application/vnd.adobe.xfdf.
Users can store and manage PDF form data using FDF files. Visit http://segraves.tripod.com/index3.htm for some examples. For our purpose of serving filled-out PDF forms, the user never sees or handles the FDF file directly.
You have two options for automatically filling an online PDF form with data. You can serve FDF data that references the PDF form, or you can create a URL that references both the PDF form and the FDF data together.
To maintain form data, you must display the current state of the data to the user. This enables the user to review the data, update a single field, and submit this change back to the server. With HTML forms, you can set field values as the form is served to the user. With PDF forms, you can use the Forms Data Format (FDF) to populate a form's fields with data.
The PDF Reference describes the FDF file format. Its syntax uses PDF objects Section 6.8 to organize data. To see an example, open your PDF form in Acrobat and fill in some fields. Export this data as FDF by selecting Advanced Forms Export Forms Data . . . (Acrobat 6) or File Export Form Data . . . (Acrobat 5). Our basic PDF form yields an FDF file that lists fields in name/value pairs and then references the PDF form by filename:
%FDF-1.2
1 0 obj
<< /FDF << /Fields [ << /T (text_field_1) /V (Here is some text) >>
<< /T (text_field_2) /V (More nice text) >> ]
/F (http://localhost/fine_form.pdf)
>>
>>
endobj
trailer
<< /Root 1 0 R >>
%%EOF
For XML fans, XFDF is an XML-based subset of FDF features. Acrobat Versions 5 and 6 support XFDF. Its MIME type is application/vnd.adobe.xfdf.
Users can store and manage PDF form data using FDF files. Visit http://segraves.tripod.com/index3.htm for some examples. For our purpose of serving filled-out PDF forms, the user never sees or handles the FDF file directly.
You have two options for automatically filling an online PDF form with data. You can serve FDF data that references the PDF form, or you can create a URL that references both the PDF form and the FDF data together.
0 comments:
Post a Comment