Merging PDF Documents v6
  • 29 Apr 2021
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Merging PDF Documents v6

  • Dark
    Light

Article summary

Overview 

The Merge PDFDocuments step allows users to combine two separate PDF Documents into a single file Output. This step can be used within a Flow to Merge Constant mapped Files or the results of other PDF handling steps. Additionally, to help with the organization of these files, users may utilize an Add PDF Header and Footer step to add their desired Page Header and Footer. The example below demonstrates how to use the provided example Project to import and merge two PDF Documents.

Example Project 
Import the following Project file to follow along with the rest of the document. For more information on importing files in Decisions, see:
Import and Export Overview.

Example

  1. From a Designer Folder, select CREATE FLOW from the Global Action Bar, and CREATE a new Flow
  2. From the Steps in the Flow Designer, navigate to DATA > PDF and attach a Merge PDFDocuments step to the Start step. 
  3. Select the Merge PDFDocuments step to navigate to its Properties tab; under Inputs, Constant map the desired files to Document1 and Document2 by dragging the file into the Drag file herefield, or clicking CHOOSE FILE. 
    Step Function 
    This step will be used to combine the two PDF Documents into a single File. 

  4. From the same PDF category in the Steps tab, attach an Add PDF Header and Footer step to the Done path of the Merge PDFDocumentrs step. 

  5. From the Properties tab of the Add Header and Footer step, set the mapping for Footer Alignment to Constant then select the desired option from the dropdown menu. 


  6. If desired, adjust the Page Footer, then Constant map a Page Header. Afterward, Select From Flow map MergePDFDocuments1_Output to PDF File, and Constant map the desired PDF File Name. 

    Input Config 
    Page Footer: By default, the Page Footer is set up to display the Page number along with the total number of Pages.

    PDF File Name: Include ".pdf" at the end of the mapped File Name to ensure that file will save and output properly as a PDF file. 


  7. Under Steps > Favorite Steps, attach a Show Form step to the Done path of the Add PDF Header and Footer step. From the Show Form step's Properties select Pick or Create Form, then CREATE a new Form


  8. From the Form Designer, design a Form using a File Download Component and a "Close" Button component from Form Components > Favorite Components. Save the Form, then Close the Form Designer.

    Component Properties 
    After adding the File Download component, from its Properties select Button from the Select Button Type dropdown to change the Download File link into a Button.


  9. Back in the Flow Designer, navigate to the File Download Form's Properties and map Select From Flow PDF File to File Download. Then, connect the Failed path from the Add Header and Footer step and the Outcome path from the File Download Form, to the End step. 


  10. Save the Flow, then if desired, close via X. 



Debug 

To Debug the Flow: 
  1. From the Flow Designer, select the Debug link from the top Action bar, then click FULL.
  2. Upon reaching the File Download Form, click the Download File Button
  3. Open the downloaded File and confirm that the Header and Footer match the expected format. 



Was this article helpful?