A great number of PDF forms contains fields where data can be filled in.
There are two sorts of fields: flattened and interactive. Flattened fields are a static representation of their content. They are no longer editable.
A field can be made interactive by clicking on the tab Settings and then choosing the option "Preserve interactive field". Interactive field have zero or more actions attached to them. For instance, the field value can be calculated or the field can be made read-only.
Filling field values
Fields are filled using an expression in the "field binding" section.
The expression entered is evaluated during the merge and the result is placed in the field.
Different field types can require different ways to fill in data.
In checkbox fields you have to specify a condition. If the condition evaluates to true, the checkbox is checked, otherwise the checkbox is unchecked.
Combo box, list box and radio button fields
In these types of option fields, the value of the field is specified in terms of an option.
You can either specify a condition on each option (given a child nodes of the field) or specify the name of the option that should be selected.
If you choose to specify a condition on each option, you'll must enter an expression in the text box for each option node.
If you choose to specify an expression that evaluates to the name of the selected option, you should enter this expression in here:
Adding new fields
Besides fillings fields that are already in an existing PDF form, variaDoc also enables you to add new fields to a page in a merge project. Just like fields that already exist in the PDF form, these fields can be flattened or non-flattened. Adding fields to a page in a merge project will not change the existing PDF form in any way, only the output document(s).
To add a field to a page, first select the field node in the toolbar, click on the appropriate field, then select the region on the page where the new field should be placed with the mouse.
Fields added in the merge project are displayed in light purple compared to light pink for existing fields.
For fields added in a merge project, you should specify the field value as you do for existing fields, and the appearance of the field(e.g. the border, font and font size).
Overriding existing fields
If you have an existing field in a PDF that you want to control the appearance of, but don't have control over the template PDF (e.g. because it is created by a third party) you can choose to override the appearance and behavior. When you override the appearance, use a Style to set the new appearance.
Using fields in content sections
Fields can also be used in a section containing dynamic content. In that case you need to specify the name and the size of the field. You specify this in the setting of the field node. You can find the settings next to the binding tab.
Field used in sections can only use styles for their appearance.
The name of the field is specified using the Field name property.
This property is an expression, which means that the field name can be derived from data references. If this is left empty, the node name is used. Note that a field in PDF may only contain normal letters and certain special characters.
The size of the field must be specified by editing the width and height in the Field size settings.
The width and height can be specified in various units. The width of the field can also be specified relative to the width of the containing element(e.g. a field in a table cell with a width of 50% results in a field that uses half the horizontal space of the cell its contained in).