Description:
This step is used to populate the form fields in the PDF document.
Inputs
- pdfFormFile – Choose PDF Form File as a file template
- pdfOutputFileVarGlobal – Variable / Global to hold the output PDF file
- pdfVirtualFileVarGlobal -- Variable / Global to hold the output PDF virtual file path
- outputFileReadOnly -- Set output PDF as Read-Only (for fields that were set)
- pdfFieldMap -- PDF form field mappings with respective values
Returns
- True – step executed successfully
- False – step failed to execute
Usage :
Example:
Let’s build and execute the setPDFFormFieldsDef example.
- Create a new definition called “setPDFFormFieldsDef”
- Select the definition and click the “design” button
- Drag a setPDFFormFields step from the toolbox
- Connect the dots between the start and setPDFFormFields step
- Click the “setPDFFormFields ” step to configure its “Settings” properties. Provide a step name. Select the PDF file from the drop-down list. Provide the variable/global reference to hold the PDF output file. Provide the variable/global reference to hold the virtual path of the PDF output file. Click on the button to complete the field mappings.
- Click on the "PDF Form file" field icon. Upload the PDF file as shown in the below graphic.
- Click on the button to complete the field mappings. The Field Mappings popup window is displayed below. Click the add row (+) button to insert a blank row. Select the PDF field names from the drop-down list. Provide the value or variable/global reference. You may repeat this for all the form fields. Click on the Save button to confirm.
- The completed field mappings may resemble like below. Click on SAVE to confirm the changes.
- The PDF file in this example contains the following field structure (for reference).
- Select the "Advance Properties" tab. The output PDF can be configured as a “read-only” file using the ON setting. The output file is generated and stored on the server path after the process instance completes successfully. The PDF file path information is stored in the variables referred to above. Viewing the output file shows that only the fields mapped to the values are rendered as "read-only". The output PDF file is generated using the OFF setting with all fields in the "edit mode".
- Save the process definition, create a new instance, and execute. The step should map the PDF form fields with the values configured on the step properties and generate the output file.
- The output PDF file generated by this example contains the following field values (for reference).
Configure:
This workflow step requires manual configuration (along with its data type). As an admin user, navigate to the Administration—Data Types—Auto Detect menu option. Select the data types related to this step and configure them to your FlowWright environment, as shown in the graphic below.
As an admin user, navigate to the Administration—Steps—Auto Detect menu option. Select the step and configure it for your FlowWright environment, as shown in the graphic below.