Merge output PDF File

Hi,

Can someone give advise and help me on how to merger output PDF file? The concept is we are receiving multiple input files and need to output it on 1 PDF file, so we need to append the output of each file to the same PDF file.

High level is:
Input Datafile 1 → Datamapping → Template → JobPreset → Output Preset → Output PDF file
Input Datafile 2 → Datamapping → Template → JobPreset → Output Preset → Output PDF file (to append on the PDF file from datafile1)
Input Datafile 3 → Datamapping → Template → JobPreset → Output Preset → Output PDF file (to append on the PDF file from datafile1 and datafile2)

Thank you

Are all the data file using the same Datamapper and Template?

yes, using the same datamapper and template

Then you need to setup your Workflow as follow:

  • Input
  • Datamapper
    • Make sure to add a field which will be common to all records you wish to be in the same PDF, like a customer number or else

Once you know you have all the inputs processed, you call all those records that need be together using the Retrieve Items plugin.

  • Template
  • Job Preset
  • Output Preset

Sorry, that one is for OL Connect Workflow right? I am working for the OL Connect Automate, can advise how to do it on OL Connect Automate?

Then the logic is the same:

You need to setup your flow as follow:

  • Input
  • Datamapping node
    • Make sure to add a field which will be common to all records you wish to be in the same PDF, like a customer number or else

Once you know you have all the inputs processed, you call all those records that need be together using the Query Items node.

  • Query Items node
  • Paginated Content node
  • Paginated Job node
  • Paginated Output node

Hi @pascualj, if you are receiving multiple files and processing them in same time, I suggest using the Folder Listing node to capture the files from your folder and then process each file through DataMapper and Template. You can store the generated contentSetId for each processed file in the payload for example.

Once all listed files have been processed, you can join all the generated contentSetIds into an array and store it in the contentSetId property. The paginated output requires a single contentSetId or an array of contentsetId passed through contentSetId property.

Your flow could start with inject node, which you can schedule based on when the files are recieved. for example, once per day, or at a specific time interval, etc.

Based on your example, I understand that you want to generate a PDF without any additional processing, such as sorting, or grouping. Therefore, you don’t need to use a Job Preset in this case, as the Paginated Ouptut in OL Connect Automate can use either a JobSetId, if available, or a contentSetId as its input. In this case, you can use the contentSetIds generated from the Paginated Content directly and generate a single PDF.

The flow should look like the image below. I added comments to the nodes to guide you through the flow.