Merge PDFs
merge_pdfsCombine multiple PDFs and images into one new PDF in the given order—PDF pages sequentially, each image centered on its own A4 page. Use it to build PDFs from documents, photos, or scans.
Instructions
Joins several PDFs and images (JPEG, PNG, WebP, GIF, BMP, AVIF) into one new PDF, in the order given: all pages of each PDF, and each image centred on an A4 page of its own. Use it to combine documents or turn photos and scans into a PDF; to take pages out, use extract_pages or split_pdf, and to turn pages into images, use pdf_to_images. The inputs are not changed, and an existing output file is only replaced with overwrite: true. Fails with a message when a path cannot be read, when no file is a PDF or image, and for encrypted PDFs; other files in the list are skipped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Absolute paths of the PDFs and images, in the order wanted (at least one). | |
| output | Yes | Absolute path of the new PDF. If the file exists, the call fails unless overwrite is true. | |
| overwrite | No | Allow replacing an existing file (default false). |