Last Updated: 08/11/2016Introduced in Verision: 2.0
The Set PDF Form Fields component in a flow can populate a PDF form template with data. When used in a flow, this step reads a PDF form template to identify its fields, then provides input fields for populating the form data. This step does not actually create the file; it works in conjunction with the Create File step.
The Set PDF Form Fields component is found in the Toolbox, under Data > PDF.
This example populates a very simple bank account application.
The bank application is a PDF form template designed with the following fields:
From a Designer Folder, create a new flow.
From the Toolbox, expand Data > PDF and drag and drop a Set PDF Form Fields component into the workspace. Connect the Start step to this step.
Click on the Set PDF Form Fields step, and then select the Properties tab. The PDF File Example field can contain either the original PDF form template to populate, or an example of a populated PDF file of the same template type. Click the Browse button and select the appropriate file. Notice the field names are identified.
Next, configure the inputs for the Set PDF Form Fields step. This example uses constant data, however variables or merged text, for example, could be used. The Input fields will respect the data type of the PDF form field when mapping in the input data. For example, if a form field in the PDF is numeric, establish compatible input for the field within the Set PDF Form Fields step.
The Outputs section shows the name of the Set PDF Form Fields step output, which is of type FileData. This example retains the default value for the file data.
This completes the configuration of the Set PDF Form Fields step.
Next, add a Create File component following the Set PDF Form Fields step. From the Toolbox, expand Integration > File and drag and drop a Create File component into the workspace. Connect the Set PDF Form Fields step to this step. Connect the Create File step to the End step.
Click on the Create File step. From the Properties panel, under Inputs > Data, set the mapping type to Select Value.
Click on the Path: field Browse button and select the file content output from the Set PDF Form Fields step, PDF File.Contents.
Set the FileName mapping type to Constant, and type a name for the file in the Value field.
This completes the configuration of the Create File step, and completes the flow.
Click the Debug Flow link above the workspace. Run the flow in the Debugger.
Note that in Decisions version 3.5 and above, you’ll need to click Test Flow to access the Debugger.
The file generates to C:\Program Files\Decisions\Decisions Services Manager by default.
Open the file using a PDF reader. Notice the form fields are populated.