Create a Layout from a Predefined PDF Form
There're many PDF forms available online that you may want to use as layouts for the report data. For example, government forms that your company is required to submit. You can use these downloaded PDF files as the report layouts, supplying the XML data at runtime to fill in the report fields.
Some of these forms already have form fields defined, some don't. If the PDF form already has fields defined, then you can use one of the following methods to match the form field names to the data field names:
-
Use Adobe Acrobat Professional to rename the fields in the document to match the names of the elements in the XML data file.
-
Use BI Publisher's Data Model Editor to rename the XML element names in the data file to match the field names in the PDF form.
If the form fields are not already defined in the downloaded PDF, then you must create them.
Determine If a PDF Has Form Fields Defined
Follow these steps to determine if a PDF has form fields defined and to get a list of the field names.
- Open the document in Adobe Acrobat Professional.
- Click Highlight Fields. Form fields that exist in the document are highlighted.
- From the Form menu, select Add or Edit Fields. The field names display in the document as well as in the Fields pane.
Use a Predefined PDF Form as a Layout by Renaming the Form Fields
You can use a PDF form as a template for another form.
To use a predefined PDF form as a layout:
Use the Comb of Characters Option
The comb of characters option for a PDF form field in Adobe Acrobat spreads the text evenly across the width of the text field.
Use this option when the form field requires the characters to be entered in specific positions, as the Routing number field shown in the following figure:
To use this feature, perform the following:
When you run the report, the characters comprising the value for the routing field will be spread across the text field as shown in the following figure:
The following figure shows how the data will display in the field when the data for the routing field doesn't contain the full nine characters and the Alignment option is set to left: