StayPut
v0.1.0Local PDF and photo tools: merge, split, rotate, number PDFs; strip photo GPS.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pdf_info PDF info
Read a PDF on this machine and report its page count, page sizes, title and whether it was encrypted. Use before splitting, extracting or rotating to learn how many pages there are.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to the PDF. |
password | string | Password for a PDF that asks for one when opened. Used only on this machine. |
merge_pdfs Merge PDFs
Combine several PDFs on this machine into one, in the order given. The same file may appear more than once. Writes a new PDF and returns its path.
| Parameter | Type | Description |
|---|---|---|
inputs * | array | PDF paths, in the order their pages should appear. |
output | string | 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 | string | Password for a PDF that asks for one when opened. Used only on this machine. |
extract_pdf_pages Extract, reorder or delete PDF pages
Write a new PDF containing only the listed pages, in the listed order. Use it to pull out a range, reorder pages ("3,1,2") or drop pages (list the ones to keep). Pages are 1-based; ranges like "1-3, 7" and reversed ranges like "5-1" work.
| Parameter | Type | Description |
|---|---|---|
input * | string | Path to the PDF. |
pages * | string | Pages to keep, for example "1-3, 7" or "3,1,2". |
output | string | 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 | string | Password for a PDF that asks for one when opened. Used only on this machine. |
split_pdf Split PDF
Split a PDF into several files of N pages each (1 = one file per page), written into a folder. Returns the list of files.
| Parameter | Type | Description |
|---|---|---|
input * | string | Path to the PDF. |
output_dir | string | Folder for the parts. Defaults to a new folder beside the input named <file>-split. |
pages_per_file | integer | Pages in each output file. Default 1. |
password | string | Password for a PDF that asks for one when opened. Used only on this machine. |
rotate_pdf Rotate PDF pages
Rotate all pages, or only the listed ones, clockwise by 90, 180 or 270 degrees, and save the rotation permanently in a new PDF.
| Parameter | Type | Description |
|---|---|---|
degrees * | Clockwise rotation to add. | |
input * | string | Path to the PDF. |
output | string | 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. |
pages | string | Pages to rotate, for example "1, 3-4". Default: every page. |
password | string | Password for a PDF that asks for one when opened. Used only on this machine. |
number_pdf_pages Add page numbers
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}".
| Parameter | Type | Description |
|---|---|---|
input * | string | Path to the PDF. |
first_page | integer | First page (1-based) that gets a number; earlier pages, such as a cover, are left blank. |
font_size | number | |
output | string | 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 | string | Password for a PDF that asks for one when opened. Used only on this machine. |
position | string | |
start | integer | Number printed on the first numbered page. |
template | string | Text to print. Default "{n}". |
images_to_pdf Images to PDF
Put JPG and PNG images into one PDF, one image per page, in the order given. Images are embedded as they are, without re-compression.
| Parameter | Type | Description |
|---|---|---|
inputs * | array | JPG or PNG paths, in page order. |
margin | number | Margin in points (72 = 1 inch). |
output | string | 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. |
page_size | string | "fit" makes each page the size of its image; "a4" and "letter" centre the image on a standard page. |
inspect_image_metadata Inspect photo metadata
Report the metadata hidden in a JPG, PNG or WebP photo: GPS location, camera make and model, capture time, editing software, and which blocks (EXIF, XMP, IPTC, comments) are present. HEIC files report EXIF only.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to the image. |
strip_image_metadata Remove photo metadata
Write a copy of a JPG, PNG or WebP photo with EXIF (including GPS location), XMP, IPTC and comments removed. Lossless: the image data is not re-encoded. The original file is left untouched.
| Parameter | Type | Description |
|---|---|---|
input * | string | Path to the image. |
keep_color_profile | boolean | Keep the ICC colour profile so colours look the same. Default true. |
output | string | Where to write the cleaned copy. Defaults to <name>-clean.<ext> beside the input. Existing files are never overwritten. |