Advanced PDF forms

PDF forms were added to PDF specification starting from version 1.2.
They were first introduced by Acrobat and hence they are usually called “Acroforms”.
There are plenty of tools to design interactive documents with “Acrofoms” technology, OpenOffice is one of them.

Starting from version 1.5 a new designing method based on XML was unveiled – XFA forms.

Acroforms specifies several field types -

  • Pushbuttons
  • Text fields
  • Choice fields
  • Signature fields

Some of the more useful entries of a field object dictionary

Open a PDF with some pdf inspector and look for “/FT”  - Type of field.
For a pushbutton it will appear as /FT Btn, for a text field it will appear as /FT Tx.
The type of the pushbutton is defined by the “/Ff” entry:
A combination of bit flags:
bit position at 15: exactly one radio button can be chosen.
bit position at 17: a pushbutton that does not retain any value
bit position at 16: if 17 is clear, and 16 is set then it is a group of radio buttons otherwise it is a checkbox.


/T defines the name of the field.
/V holds the value of the field as defined by it’s appearance states list – in /AP
If the values are Unicode strings – /OPT is used instead of /V

/AS – default value

/AP – the appearance state can have child dictionaries:
/N – required, the normal appearance
/D – the annotation’s down appearance

An example of a pushbutton field:
image
The “Off” value may not appear in the appearances list, however it’s always a valid value.
The opt contains the current value of the field and if we expand it, we’ll see the exact string:
image

/F says what type of element it is. 4 is for a pushbutton.




     

Post a Comment

Previous Post Next Post