Merge PDF Files

Use this step to merges multiple PDF files into 1 PDF file

Last published at: September 9th, 2025

mergePDFFiles Step

Description:

The Merge PDF Files step enables a FlowWright workflow to merge multiple PDF documents into a single PDF file.

Business processes often generate multiple PDF documents that must be delivered together, such as invoices with supporting documents, contracts with appendices, employee onboarding packages, engineering documentation, compliance reports, or customer statements. Rather than manually combining documents, this step automates the merging process by creating one consolidated PDF.

The workflow specifies a list of input PDF files, the output location for the merged document, and the FlowWright virtual file path associated with the final PDF.

Typical uses include:

  • Combining invoices with supporting documents
  • Creating customer document packages
  • Merging contracts and appendices
  • Building employee onboarding packets
  • Consolidating engineering specifications
  • Producing compliance documentation
  • Creating project documentation packages
  • Preparing reports for distribution or archival

This step helps organizations automate document assembly while improving document organization and reducing manual effort.

 

Inputs

  • File Path List – Specifies the collection of PDF file paths to merge. The files are merged in the order defined by the configured FileList data type.
  • Output File Path – Specifies the location where the merged PDF document will be saved.
  • PDF Virtual File Path – Specifies the FlowWright virtual file path associated with the merged PDF document for use by subsequent workflow activities.
 

 

Returns

  • True – All specified PDF files were successfully merged, and the consolidated document was created. Workflow execution continues through the success path.
  • False – The merge operation could not be completed because of invalid input files, inaccessible file paths, incompatible documents, inaccessible output location, or another execution error. Workflow execution follows the alternate path.
 

 

Usage:

The Merge PDF Files step is typically used after multiple PDF documents have been generated or collected and before they are archived, distributed, published, or processed by subsequent workflow activities.

During execution:

  1. Read the configured list of PDF file paths.
  2. Open each PDF document in the configured order.
  3. Merge the documents into a single PDF file.
  4. Save the merged document to the configured output location.
  5. Associate the merged document with the configured PDF virtual file path.
  6. Continue workflow execution through either the True or False return path.

A typical workflow might look like this:

 

Typical workflow scenarios include:

  • Creating customer invoice packages
  • Merging contracts with supporting exhibits
  • Combining engineering drawings and specifications
  • Building employee onboarding documentation
  • Producing audit evidence packages
  • Creating project handover documentation
  • Publishing comprehensive user manuals

 

Example:

Let’s build and execute the “mergePDFFilesDef” example.                             

  • Create a new process definition called “mergePDFFilesDef” and open it in Designer mode.
  • Drag  “updateVariable” and “mergePDFFiles” steps to the canvas.
  • Connect the dots between the “Start” and other steps, as shown above. 
  • Define a few variables or globals to store the file path result.
  • Click the "updateVariable" step to configure its "Required" properties. Provide a name for the step, then click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description. 

 

  • Select the “Optional” tab. Click the button to update multiple variables. A pop-up window appears for configuration. Click the AddRow (+) button to insert an empty row. Enter the variable name and the file path on the application server as the variable value. Click the Save button. You may add multiple file path references by using the AddRow (+) button. 

 

  • Click the "mergePDFFiles" step to configure its "Required" properties. Provide a name for the step. Provide variable or global references to hold the “Output and Virtual PDF file paths”. Click the button to specify the source file path list. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description. 

 

  • A pop-up window appears for configuration. Click the AddRow (+) button to insert an empty row. Enter the variable or global reference with a file path as the value. You may also enter an actual file path, as shown below. Click the Save button. 

 

  • The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new process instance, execute it, and then render the process instance.

 

  • Click the “mergePDFFiles” process step to view its properties. The step should merge multiple PDF files on the application server into a single PDF file. Copy and paste the PDFVirtualPath variable value into a browser window to view the merged PDF file. 

 

Tips:

  • Arrange the file list in the desired document order before executing the workflow.
  • Verify that all referenced PDF files exist before the merge operation begins.
  • Ensure that each source PDF is complete before merging.
  • Use descriptive output file names that clearly identify the merged document.
  • Configure the PDF virtual file path when downstream FlowWright workflow steps need to reference the merged document.
  • Route the False path to logging or notification activities for easier troubleshooting.
  • Combine this step with PDF Add Table Of Contents, PDF Remove Blank Pages, PDF Optimize File, PDF WaterMarks, PDF Encrypt Secure, or Send Email to build comprehensive PDF publishing workflows.

 

Notes:

  • At least one input PDF file is required.
  • The File Path List must contain valid PDF file paths.
  • Files are merged according to the order defined in the configured file list.
  • The output file path must reference a writable location.
  • The merged PDF is saved to the configured output location.
  • The configured PDF virtual file path enables subsequent FlowWright workflow activities to reference the merged document.
  • Both the True and False return paths should be implemented to provide complete workflow handling.
  • Execution details and PDF merge activities are recorded in the FlowWright workflow execution log.

 

Merge PDF Files vs. Redact PDF:

Both workflow steps process PDF documents, but they serve different document management purposes.

Merge PDF Files Redact PDF
Combines multiple PDF documents into a single consolidated PDF. Removes or blanks out specified keywords within a PDF document.
Focuses on document assembly and consolidation. Focuses on protecting confidential and sensitive information.
Requires a list of PDF files to merge. Requires a keyword list identifying the content to redact.
Produces a single merged PDF document. Produces a sanitized PDF document with sensitive information concealed.
Ideal for document packages, reports, contracts, onboarding documents, and compliance submissions. Ideal for privacy compliance, confidential document sharing, and protecting personally identifiable information (PII).

As a general guideline:

  • Use Merge PDF Files when workflows need to combine multiple PDF documents into a single organized document for distribution, archival, or publication.
  • Use Redact PDF when workflows must permanently conceal confidential information before documents are shared with internal or external recipients.

 

Definition Sample:

You may download the sample workflow definition from the link provided and import it into your FlowWright environment.

Note: Verify and complete any missing configuration after importing the sample, including:

  • File path list
  • Output PDF file path
  • PDF virtual file path
  • Success and failure workflow branches
  • Required file system permissions
  • Availability of all source PDF documents

After verifying the configuration, save and publish the workflow before execution.

Click here to download the sample file.