Skip to main content

Merge PDFs

Merge multiple PDF files into one, with optional per-source page selection. Replaces CombinePDFs and SplitPDF.

Category: Structured Data Files (Excel, JSON, PDF) · Group: Files · Activity name: MergePDFs

The MergePDFs activity in the designer

Example

outputVariable = MergePDFs([], "<outputPath>", maxSize=0, oversizeBehavior="shrink")

Inputs

NameTypeRequiredDefaultDescription
PDF SourcesarrayYesList of PDF files to merge. Each source can specify page selection.
Output PathstringYesPath for the merged PDF file.
Max Output Size (bytes)integerMaximum size of the merged PDF in bytes (e.g. 20971520 for 20 MB). 0 or empty for no limit.
Oversize BehaviorstringshrinkWhat to do when the merged PDF exceeds Max Output Size. Shrink: dedup + strip metadata, then JPEG-recompress to fit. Truncate: include as many pages as fit. Fail: raise an error. One of: shrink, truncate, fail.

Outputs

NameTypeDescription
outputVariablestringPath to the merged PDF file.