Merge PDFs
merge_pdfsMerge multiple PDFs into a single file in specified order, carrying over metadata from the first. Save to a path or get base64 output; warnings detail any lost elements.
Instructions
Merge multiple PDFs into one, in the given order. Document metadata is carried over from the first file. Pages are copied into a new document, so document-level information (tagged structure, XMP, attachments, AcroForm, bookmarks, etc.) is not carried over. Anything lost is reported in warnings; follow up on the output with attach_file / ensure_tagged / add_bookmarks / set_metadata as needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputPaths | Yes | Absolute paths of the PDFs to merge (in merge order, 2 or more). | |
| outputPath | No | Destination file path (absolute). When omitted, a base64 string is returned instead. | |
| returnBase64 | No | When true, include a base64 string in the result in addition to saving. | |
| allowBreakingSignatures | No | When the target is digitally signed (detected via /ByteRange), the default is an error. Set true to proceed, accepting that the signatures become invalid. |