After you have converted your document to PDF, you define form fields that will display the data from the XML input file. These form fields are placeholders for the data.
The process of associating the XML data to the PDF template is the same as the process for the RTF template. See: Associating the XML data to the template layout.
When you draw the form fields in Adobe Acrobat, you are drawing them on top of the layout that you designed. There is not a relationship between the design elements on your template and the form fields. You therefore must place the fields exactly where you want the data to display on the template.
You can define a placeholder as text, a check box, or a radio button, depending on how you want the data presented.
Note: If you are using Adobe Acrobat 5.0, the Form Tool is available from the standard toolbar. If you are using Adobe Acrobat 6.0 or later, display the Forms Toolbar from the Tools menu by selecting Tools > Advanced Editing > Forms > Show Forms Toolbar.
When you enter a name for the placeholder, enter either the XML source field name or assign a different, unique name.
Note: The placeholder name must not contain the "." character.
If you assign a different name, you must map the template field to the data source field when you register the template in the Template Manager. Mapping requires that you load the XML schema. If you give the template field the same name as the XML source field, no mapping is required.
For information on mapping fields in the Template Manager, see Mapping PDF Template Fields.
To create a text placeholder in your PDF document:
Select the Form Tool from the Acrobat toolbar.
Draw a form field box in the position on the template where you want the field to display. Drawing the field opens the Field Properties dialog box.
In the Name field of the Field Properties dialog box, enter a name for the field.
Select Text from the Type drop down menu.
You can use the Field Properties dialog box to set other attributes for the placeholder. For example, enforce maximum character size, set field data type, data type validation, visibility, and formatting.
If the field is not placed exactly where desired, drag the field for exact placement.
Select the Text Field Tool from the Forms Toolbar.
Draw a form field box in the position on the template where you want the field to display. Drawing the field opens the Text Field Properties dialog box.
On the General tab, enter a name for the placeholder in the Name field.
You can use the Text Field Properties dialog box to set other attributes for the placeholder. For example, enforce maximum character size, set field data type, data type validation, visibility, and formatting.
If the field is not placed exactly where desired, drag the field for exact placement.
XML Publisher supports the following options available from the Field Properties dialog box. For more information about these options, see the Adobe Acrobat documentation.
General
Read Only
The setting of this check box in combination with a set of configuration properties control the read-only/updateable state of the field in the output PDF. See Setting Fields as Updateable or Read Only.
Appearance
Border Settings: color, background, width, and style
Text Settings: color, font, size
Common Properties: read only, required, visible/hidden, orientation (in degrees)
(In Acrobat 6.0, these are available from the General tab)
Border Style
Options tab
Multi-line
Scrolling Text
Format tab - Number category options only
Calculate tab - all calculation functions
A check box is used to present options from which more than one can be selected. Each check box represents a different data element. You define the value that will cause the check box to display as "checked."
For example, a form contains a check box listing of automobile options such as Power Steering, Power Windows, Sunroof, and Alloy Wheels. Each of these represents a different element from the XML file. If the XML file contains a value of "Y" for any of these fields, you want the check box to display as checked. All or none of these options may be selected.
To create a check box field:
Draw the form field.
In the Field Properties dialog box, enter a Name for the field.
Select Check Box from the Type drop down list.
Select the Options tab.
In the Export Value field enter the value that the XML data field should match to enable the "checked" state.
For the example, enter "Y" for each check box field.
Select the Check Box Tool from the Forms Toolbar.
Draw the check box field in the desired position.
On the General tab of the Check Box Properties dialog box, enter a Name for the field.
Select the Options tab.
In the Export Value field enter the value that the XML data field should match to enable the "checked" state.
For the example, enter "Y" for each check box field.
A radio button group is used to display options from which only one can be selected.
For example, your XML data file contains a field called <SHIPMENT_METHOD>. The possible values for this field are "Standard" or "Overnight". You represent this field in your form with two radio buttons, one labeled "Standard" and one labeled "Overnight". Define both radio button fields as placeholders for the <SHIPMENT_METHOD> data field. For one field, define the "on" state when the value is "Standard". For the other, define the "on" state when the value is "Overnight".
To create a radio button group:
Draw the form field.
On the Field Properties dialog box, enter a Name for the field. Each radio button you define to represent this value can be named differently, but must be mapped to the same XML data field.
Select Radio Button from the Type drop down list.
Select the Options tab.
In the Export Value field enter the value that the XML data field should match to enable the "on" state.
For the example, enter "Standard" for the field labeled "Standard". Enter "Overnight" for the field labeled "Overnight".
Select the Radio Button Tool from the Forms Toolbar.
Draw the form field in the position desired on the template.
On the General tab of the Radio Button Properties dialog, enter a Name for the field. Each radio button you define to represent this value can be named differently, but must be mapped to the same XML data field.
Select the Options tab.
In the Export Value field enter the value that the XML data field should match to enable the "on" state.
For the example, enter "Standard" for the field labeled "Standard". Enter "Overnight" for the field labeled "Overnight".