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

Understanding PDF forms – introduction to FDF forms

May 25, 2011 1 min read

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 fieldsbyte 18=combotext fieldsbyte 13=multilinebyte 14=passwordbutton fieldsbyte 16=radiobyte 17=pushbutton

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!