Generating PDF output documents from a process

Learn to generate PDF documents from a process

Last published at: March 5th, 2026

A process may use multiple Forms to gather user data and handle approvals; the collected data can then be used to generate an output document. 

To achieve this, let's use the “generateOutputDoc” step in the process definition. 

Let’s use the Form definition “TestFormFile,” which looks as follows:

 

Let’s use the process definition “TestFormFileDef,” which looks as follows:

 

Let's move the “generateOutputDoc” step to the designer and connect it to the process's final step. The red alert sign indicates that the step property configuration is incomplete. The context involves creating a new Form, submitting it with some values, transferring data from the previous form into a new Form instance, and then printing a PDF document during the process.

 

Add a new variable, varOutputFile, to store the PDF file path. 

 

Click the “generateOutputDoc” step to configure the Settings properties. Provide the variable reference to store the path to the output PDF file. Click the button to define the document content, and a pop-up window will appear for configuration. Click the Variable(s) button to view the list of system and process variables available for use. Likewise, you may use the Global(s) if they are defined in the process. Use the rich text area to determine the document content and select the variables from the drop-down list to merge with the content, as shown below. You may format the content using the tools provided in the rich text area, and the output document in PDF will contain the same.   

 

The document content in the rich text area in this example looks as follows. 

 

Save the changes to both the step and the process definition.   

 

Let’s create and run a new process instance. 

 

Then navigate to the Engage > Tasks page, as shown below. Select the Instances search filter and choose the process instance from the drop-down list. The incomplete task assigned to the user appears below. You can also search for the task using the Search textbox. Click the task to open it.

 

When the Form is filled out, submit it. Note: The Comments textbox is left empty because it's read-only, and this field's value is set within the process using the “setFormFieldValues” step. 

 

The following shows the executed path for the process instance. To inform you, the process instance is complete. Click the “Create Output Doc” step to see the step properties below. 

 

The “Create Output Doc” step properties appear on a new page. The variable reference below contains the output PDF file path information.  

 

Use the AppURI and the variable output file path to view the document content in the web browser. 

 

Definition Sample:

You may download the sample definition(s) from the link provided and later import them (drag-and-drop) into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page. 

Note: Please verify and complete the process steps for any missing configurations, such as file path references and database connections, after the import. Then, save the definition to confirm the changes. 

Click here to download the sample XML file.

Click here to download the sample HTML file.