Add page numbers to a PDF
add_pdf_page_numbersAdd page numbers to a PDF. Stamps a page number on every page (or on pages). The format text must contain {n}; it can also use {total}.
Costs 1 credit per call.
Returns a temporary download link (valid 15 minutes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The PDF, base64-encoded. | |
| color | No | Text color as a hex code, e.g. "#000000" (black, default). | #000000 |
| pages | No | Pages to act on, 1-indexed, e.g. "1-3,5,7-9". Default: all pages. | |
| start | No | Number shown on the first page (default 1). | |
| format | No | e.g. "Page {n} of {total}". | {n} |
| margin | No | Distance from the page edge to the number, in points (0-200). Default 24. | |
| position | No | Where to print the number: "bottom-center" (default), "bottom-left", "bottom-right", "top-center", "top-left" or "top-right". | bottom-center |
| font_size | No | Font size in points (6-72). Default 10. |