All templates
PDFIntermediate
Merge PDFs
Robomotion•Updated 6 months ago

Overview
Combines every PDF in a folder into one consolidated document using a reusable merge subflow.
Merge PDFs
Robomotion enables users to implement advanced logic in PDF-handling flows to facilitate complex scenarios. For example, PDF nodes, loops, and conditionals can be deployed to create a flow that merges as many PDF files as the user desires.
What Merge PDFs can do
Download Fixturessubflow thenSeed PDF List(Core.Programming.Function) initialisesmsg.pdf_listwith four sample PDFs under$Home$/templates/pdf-automation/merge-pdfs/fixturesand setsmsg.default_dest.Core.Dialog.InputBoxtitledMerge multiple PDFs into oneprompts for the output folder →msg.destination_folder.Reverse And Plan(Core.Programming.Function,outputs: 2) — stops when the folder is empty; otherwise reversesmsg.pdf_list, and seedsmsg.candidate_pathas<dest>\MergedFile.pdf.Core.FileSystem.Createensures the folder exists, then aCore.Flow.Label/Core.FileSystem.PathExistsloop incrementsmsg.suffix_idxuntilmsg.candidate_pathis free and stores it asmsg.merged_path.Robomotion.PDFProcessor.Core.Mergewritesmsg.pdf_listtomsg.merged_path, thenCore.Dialog.MessageBoxtitledDone!showsmsg.dialog_textwith the final path.
Behind the scenes
- The reverse step is deliberate — users expect the last-picked document to appear first in the merged output. Preserve it when adapting the flow.
Robomotion.PDFProcessor.Core.Mergeaccepts a per-file password list via itsPasswordDelimiterparameter; the flow leaves it unused but the field remains available for password-protected inputs.- The suffix loop preserves the sequential-suffix behaviour —
MergedFile.pdf,MergedFile_2.pdf, etc. — so repeated runs never overwrite a previous output.