Split a PDF
split_pdfSplit a PDF into new files with a set number of pages each, naming them base-01.pdf, base-02.pdf, etc. Use it to cut long documents into equal parts without changing the original.
Instructions
Splits a PDF into new files of a given number of pages each (the last may be shorter), named -01.pdf, -02.pdf, ... in an existing folder, and lists them. Use it to cut a long document into equal parts; for chosen pages or a different order, use extract_pages. The original is not changed; if any of the files exists, nothing is written unless overwrite is true. Encrypted PDFs cannot be split.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the PDF. | |
| password | No | Password, if the PDF is encrypted. Without it an encrypted PDF cannot be opened; with it, it can be read, but tools that write a new PDF cannot save it. | |
| base_name | No | Start of the file names (default: the PDF's name). | |
| overwrite | No | Allow replacing an existing file (default false). | |
| output_dir | Yes | Absolute path of an existing folder for the new files. | |
| pages_per_file | Yes | Pages in each file (at least 1). |