Duplicate pages
duplicate_pagesCopy selected PDF pages after each original or at the end; add multiple copies, then save a new PDF and leave the input unchanged.
Instructions
Adds copies of the selected pages, right after each one or all at the end, named with -duplicated. Copies share the page's images, so the file barely grows. One call can add at most 10,000 pages. Writes the result as a new file next to the input (or to output_path) and never replaces an existing file; the input is left unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to a PDF file, or one starting with ~/. | |
| pages | Yes | Pages to copy, such as "2", "1-3, 5" or "4-end". Commas separate parts. | |
| copies | No | Extra copies of each page. Default 1. | |
| placement | No | "after" (default) puts copies right after each page; "end" adds them at the end. | |
| output_path | No | Optional absolute path for the new PDF, ending in .pdf. It must not exist yet. By default the result goes next to the input. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | Pages in the new PDF | |
| output_path | Yes | Where the new PDF was written |