Chris Wade Chris developed much of the Forms handling code and also the hooks for the XFA.

Understanding PDF forms – introduction to FDF forms

1 min read

FDF Format

FDF Format

In this article, I will give you a brief overview of the Form types you can find inside a PDF containing FDF forms.

The data for FDF forms is stored inside standard COS objects in a PDF. You will find most of the FDF forms data linked to the name ‘AcroForm’ Object inside a PDF file. This will then have a ‘Fields’ tag which will then list lots of PDF references which are all FDF forms. Some files will only have one or two, others contain hundreds.

The key value is th ‘FT’ entry which defines the type of Form object. What other values are present will depend on this value. Here are the possible values.

Tx = is a text field.
Ch = is a choice field.
Btn = is a Button field.
Sig = is a Signature field.

Now we know the type of field, but there are multiple fields within most types. To find out which exact field you have you also need the value for tag name ‘Ff’, this is a byte sequence where each byte represents a different flag.
These are :-
Choice fields
byte 18=combo
text fields
byte 13=multiline
byte 14=password
button fields
byte 16=radio
byte 17=pushbutton
Tx = Text  (defaults to a single line text field, the flags are options)
byte 13 = multiline
byte 14 = password
Ch = choice
byte 18 = combo
no flag = list field
Btn = button
byte 16 = radio
byte 17 = push button
neither flag = check box button

This gives you all the possible Form types for an FDF Form object. There will be lots of other values dependent on what type of Form you have. There can also be AP streams to show the Form value and JavaScript to provide validation.

We have lots more articles about both PDF Forms and PDF files in our series of Articles on Understanding the PDF File format.



Need to convert interactive PDF forms to HTML5?

FormVu converts Acrobat Forms into high quality HTML5 and JavaScript FormVu converts Acrobat Forms into high quality HTML5 and JavaScript

Chris Wade Chris developed much of the Forms handling code and also the hooks for the XFA.

Leave a Reply

Your email address will not be published. Required fields are marked *

IDRsolutions Ltd 2021. All rights reserved.