PDF kit command
edit.batch
Edit in one step
Run several commands on one document as one undo step, all or nothing: steps (1-1000), each a command id (as the document's command list names it, e.g. comment.add) and its params (doc is the batch's). A step that fails takes back the steps before it, and the batch changes nothing and leaves no undo step. label names the undo step (default: the first step's name). Undo, redo, batches and commands that open, close or save documents cannot be steps.
- Kit
- PDF 0.1.0 (.pdf)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
label | string | no | The undo step's name. |
steps | object[] | yes | (maxItems 1000, minItems 1) |
Call through pdf_run
pdf_run {
"path": "<file>.pdf",
"steps": [{ "command": "edit.batch", "params": { "steps": <object[]> } }]
}The required parameters, with placeholders for their types: not a tested example. Optional: label. pdf_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
{
"additionalProperties": false,
"properties": {
"label": {
"description": "The undo step's name.",
"type": "string"
},
"steps": {
"description": "(maxItems 1000, minItems 1)",
"items": {
"additionalProperties": false,
"properties": {
"command": {
"description": "A command id, e.g. comment.add.",
"type": "string"
},
"params": {
"additionalProperties": true,
"description": "The command's parameters, without doc.",
"type": "object"
}
},
"required": [
"command"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"steps"
],
"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.