Add page numbers
number_pdf_pagesStamp page numbers onto a PDF and save them to a new file, leaving the original untouched. Use templates like Page {n} of {total} to set the numbering format.
Instructions
Stamp page numbers on a PDF. The template may use {n} for the page number and {total} for the last number, e.g. "Page {n} of {total}". Writes a new PDF and returns its path; the input is not modified and an existing file is never overwritten. Text only, in Helvetica.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Path to the PDF. | |
| start | No | Number printed on the first numbered page. | |
| output | No | Where to write the result. Defaults to a new file beside the input. Existing files are never overwritten; a free name like file-1.pdf is used instead. | |
| password | No | Password for a PDF that asks for one when opened. Used only on this machine. | |
| position | No | Where on each page the number goes: bottom or top, then left, center or right. The text sits 28 points (about 0.4 inch) in from the page edges. Default "bottom-center". | bottom-center |
| template | No | Text to print. Default "{n}". | {n} |
| font_size | No | Font size in points, from 4 to 72. Default 11. | |
| first_page | No | First page (1-based) that gets a number; earlier pages, such as a cover, are left blank. |