PDF kit command
bookmark_move
Move a bookmark
Move a bookmark (with its children) under another parent, or within its level. Undoable.
- Kit
- PDF 0.1.0 (.pdf)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
parent | integer[] | no | New parent (omit for the top level): 1-based positions from the top level, e.g. [2, 1] = the first child of the second bookmark. |
path | integer[] | yes | The bookmark to move: 1-based positions from the top level, e.g. [2, 1] = the first child of the second bookmark. |
position | integer | no | 1-based position among the new parent's children, counted after the bookmark is removed (default: last). (minimum 1) |
Call through pdf_run
text
pdf_run {
"path": "<file>.pdf",
"steps": [{ "command": "bookmark_move", "params": { "path": <integer[]> } }]
}The required parameters, with placeholders for their types: not a tested example. Optional: parent, position. pdf_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
json
{
"additionalProperties": false,
"properties": {
"parent": {
"description": "New parent (omit for the top level): 1-based positions from the top level, e.g. [2, 1] = the first child of the second bookmark.",
"items": {
"description": "(minimum 1)",
"type": "integer"
},
"type": "array"
},
"path": {
"description": "The bookmark to move: 1-based positions from the top level, e.g. [2, 1] = the first child of the second bookmark.",
"items": {
"description": "(minimum 1)",
"type": "integer"
},
"type": "array"
},
"position": {
"description": "1-based position among the new parent's children, counted after the bookmark is removed (default: last). (minimum 1)",
"type": "integer"
}
},
"required": [
"path"
],
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (pdf_commands through @kition/[email protected], built from KitionAI/kition-pdf@b0d2725). As data: commands.jsonl.