1to1Real Registration or Feedback Forms can be extended to generate filled PDF’s. Mapping HTML Registration Pages to PDF requires Adobe Acrobat Professional and some basic knowledge of XPath.
For documentation on Registration Forms please refer to Registration Pages Overview. Once you have created an HTML registration page open the associated PDF document in Adobe Acrobat. To make this PDF fillable each field in the HTML Registration Form will need to match a Form Field in the PDF document. To convert a PDF Document to a PDF Form follow the steps outlined below.
- Click Forms->Run Form Field Recognition. Acrobat will automatically create Fields where it determines one should exist.
- Check the document and manually create any form fields Acrobat missed.
To manually create Form Fields:
- Click Tools->Forms->Show Forms Toolbar
- A new toolbar will appear with buttons for creating fields of several types.
- Select a field type by clicking.
- Once selected click on the PDF to place the field.
When finished a Form Field should exist for each input in the HTML Registration Page. 1to1Real will determine which fields to fill by reading the Name and Export Value of the Form Fields in the PDF. These names and values will be matched to the HTML inputs on the Registration Page. To set Field Properties follow the steps as outlined below.
- In Acrobat Click Tools->Forms->Edit Layout. If this option is missing ensure Edit Form In Acrobat is checked under the Forms menu.
- Once in edit mode it is possible to edit form properties by doubling clicking a Field or right clicking and selecting properties.
- In the Properties Dialog Box under Options make sure the Default Value is cleared.
- In the Properties Dialog Box under General set the Name to the appropriate XPath Statement as described in the XPath Section below.
Filling a radio button or checkbox requires the additional step of setting the Export Value.
- In properties dialog box under Options set the Export Value to match the value of the associated input on the HTML Registration page.
- All radio buttons in the same group need to have the same name.
Sample XPath:
1to1Real will fill the PDF by first generating an XML Document from any submitted Feedback Forms and contact information. To select a Node or value in this XML Document we specify an XPath statement. To map this value to the PDF document set the Name Property (of the PDF Form Field) to the XPath Statement. 1to1Real will use the XPath Statements found in each form field to find its value. For sample XPath please continue reading.To select values from a Registration Form.
<form>
<input type=”text” name=”text_Field_Name” />
<input type=”radio” name=”radio_Choose_One” value=”Selected” />
<input type=”radio” name=”radio_Choose_One” value=”No I am Selected” />
<input type=”checkbox” name=”checkbox_Tick_Me” value=”Checked” />
To select the text Field:
//feedbackcollection[@templatename=Example_space_Template_space_Name']/item[@key='Field Name’]/@value
To select a radio button:
//feedbackcollection[@templatename=Example_space_Template_space_Name']/item[@key='Choose One’]/@value
*Remember to set the Export Value to “Selected” or “No I am Selected”.
To select the checkbox:
//feedbackcollection[@templatename=Example_space_Template_space_Name']/item[@key='Tick Me’]/@value
*Remember to set the Export Value to “Checked”.
To select values from the contact.
This XML has a more complicated structure. Download the sample here.
To select the contacts first name: //contact/contact/personalinfo/person/@firstname
To select the contacts home phone number: //contact/phonenumbers/phonenumber[@numbertypeid=2]/@number
For further information on XPath and XML please visit http://www.w3schools.com/xpath/xpath_syntax.asp .