reorder_pages
Reorder PDF pages and remap takeoff sheet keys so measurements and annotations follow their pages, keeping takeoff data aligned after page order changes.
Instructions
Reorder pages in a loaded PDF document. Remaps all takeoff sheet keys so measurements and annotations follow their pages. Output file path is optional (default: "_reordered.pdf"); pass overwrite:true to allow replacing an existing file. Coordinates are image px at render scale 2.0: PDF pt × 2, origin top-left, y down (the browser canvas's native space). Sheet payloads carry dims in both px and pt.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>",
"order": "<order>"
},
"name": "reorder_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The loaded PDF file name (e.g. "plan.pdf") | |
| order | Yes | 1-based new page order, e.g. [2, 1, 3] to swap pages 1 and 2 | |
| overwrite | No | Replace the file at path even when it is not an OpenTakeoff export. Off by default: re-exporting over a previous export of your own already overwrites without this, so you only need it to deliberately destroy an unrelated file. | |
| output_path | No | Destination file path (default: "<file>_reordered.pdf") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| note | Yes | ||
| order | Yes | ||
| sheets | Yes | ||
| output_file | No | ||
| shapes_remapped | Yes |