> ## Documentation Index
> Fetch the complete documentation index at: https://agents.nanonets.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Combine PDF

> Merges multiple PDFs into one, in the order given.

Merges multiple PDFs into one, in the order given. Display name **"Combine PDF"**. On by default for new agents.

## Authentication and enablement

No integration. Default-on.

## Inputs

* `file_urls` (required): PDF or image URLs from the task or prior steps, in merge order. At least one, at most 20 per call.
* `output_filename` (optional): e.g. `report.pdf`. Default `combined.pdf`.
* `page_size` (optional): page size for pages created from images, e.g. `A4`, `Letter`, `Legal`. Default `A4`. Has no effect on PDF inputs.
* `page_ranges` (optional): take only part of each input. One entry per `file_urls` entry, in the same order — `"1-2"` for an inclusive span, `"5"` for a single page, or `""` for the whole file. Omit the whole parameter to combine whole files. Pages are 1-based.

To take two separate spans from the same document, list its URL twice with a range for each.

## Output

The merged PDF is uploaded to the task (preview + download).

## Limits and side effects

* Max 20 inputs per call. Batch larger sets yourself.
* Max 100 MB per input, and 500 MB across all inputs in one call. Inputs are fetched in order and the call is refused as soon as the running total would exceed the budget.
* `page_ranges`, when supplied, must have exactly as many entries as `file_urls`.
* A page range is not valid on an image input — images are always a single page.
* Writes one new file; does not modify the inputs.

## Expected errors

* Empty `file_urls`, or more than 20 URLs.
* A URL that is not a readable PDF or a supported image (JPEG, PNG, TIFF, WebP).
* An input over 100 MB, or a set whose combined size exceeds 500 MB.
* `page_ranges` whose length does not match `file_urls`.
* A malformed range (`"0-2"`, `"2-1"`, `"abc"`), or one that runs past the end of the document.
* A page range on an image input.
* A PDF whose page count cannot be read — the range cannot be validated, so the call is refused rather than silently returning fewer pages than asked for.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.