Understanding PDF forms – introduction to FDF forms

So how do you find FDF forms inside a PDF file? Well, you will find most of the FDF forms data linked to the name ‘AcroForm’ 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.

So now we have the actual form and can look at the data defined within it, there will be lots of different tag names (letters) and there will be ones that you have never seen before, that you have to figure out what they are for. We have had many instances of this, some turn out to be ignorable, but some are really useful for distinguishing different fields apart so that they can be treated differently, I digress.

First we need to know what type of field we are dealing with to know what else to look for, the key tag name in this case is ‘FT’ this will tell you what type of field it is:-
Tx = is a text field.
Ch = is a choice field.
Btn = is a Button field.
Sig = is a Signature field.
There are other values, that all come under the term Annotation, which will be expanded upon at a later date.

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

Are you still following me, if so great, your have a knack for this. If not this might help:
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

In my next article I will give you an introduction to the XFA format. Stay tuned…

This post is part of our “Understanding the PDF File Format” series. In each article, we aim to take a specific PDF feature and explain it in simple terms. If you wish to learn more about PDF, we have 13 years worth of PDF knowledge and tips, so click here to visit our series index!

Related Posts:

The following two tabs change content below.
Chris developed much of the Forms handling code and also the hooks for the XFA.
Chris

About 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 *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>