Use Google to find help fast. For example, search on "xpressdox choosefromlist".

Filling PDF Forms

Filling PDF Forms

PDF documents which have been prepared with PDF Form Fields (using a suitable PDF Form editor) can be filled with data captured with an XpressDox interview.  In fact, the PDF form can be filled with data from ANY source, as long as it is in XML form.

There are a few steps that have to be taken to prepare the PDF from for use by XpressDox, the most important one being to map the data elements in the XML data set to the form fields in the document.  This is done by running the Prepare PDF Form utility, which is accessed via the button in the Advanced Template Author group in the ribbon (or in the toolbar in Word 2003).  This will list the fields as the appear in the PDF form, and initially will name the fields with an “F” followed by the field number.

If the author of the PDF form assigned appropriate names to the fields, then those field names could be used as the data element names for XpressDox.  The mapping will then be achieved by pressing the “Use Internal Name” button on the Prepare PDF Form utility.  Otherwise, you can set data element names for  the fields by clicking in the data element name field itself on the utility form and assign the name you would like (much as you would rename a file in the Windows Explorer) .

Sometimes you will be preparing a PDF form which has been authored by someone in a different organisation (e.g. you may be preparing some or other government PDF form for filling with XpressDox) and it may be that the fields are not named in a way that lets you see how the fields appear on the PDF form.  The XpressDox utility allows you to open the form in a PDF viewer, and will identify the fields by writing the contents of the Data Element Name column in the utility into the relevant field in the form.  This will enable you to identify at least the text fields in the PDF form.  Unfortunately, there is no easy way like this to identify fields like check boxes and radio buttons, so at worst these will have to be named and tested and identified by trial and error.

The “Create Interview Template” button on the utility will create a set of XpressDox <<Define()>> commands which can function as the source for the capture of the data elements in an interview.  This is particularly useful for arriving at the correct definition of what is required for check box and radio button controls.

Once the form has been prepared, it is saved (by pressing the OK button on the utility).

The PDF form is filled under control of a normal XpressDox template.  The XpressDox template will identify the data set to be used, usually by capturing it in the interview, and then fills the PDF form using the <<MergePDFForm()>> function.  This function enables you to indicate the name of the PDF form file to be filled, and optionally the name of the file with which the merged result must be saved.  For example:

<<MergePDFForm(‘Declaration by Purchaser’)>>


<<MergePDFForm(‘Declaration by Purchaser’, ‘Declaration by Purchaser – Merged’)>>

The actual location of the PDF files is governed by the XpressDox configuration in the same way as the source and location XpressDox templates and merged files is controlled.

Note that the name of the PDF form as well as the output merged field name are in quotes. This is because MergePDFForm is a function. It has the powerful benefit that the names of those two files can be constructed at template run time using XpressDox conditional logic. For example <<MergePDFForm(concat(‘Declaration by ’, PartyType))>>

Leave a Reply