PDF kit command
view.setLayout
Page Layout
Sets how the pages are laid out in the view: one or two a row (with the first page alone as a cover), continuous or a row at a time, with or without gaps between them. Changes no file: nothing becomes unsaved and there is no undo step. Answers the layout now.
- Kit
- PDF 0.1.0 (.pdf)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
continuous | boolean | no | true: the rows one under the other, scrolled through; false: a row at a time. Unchanged when left out. |
gaps | boolean | no | Whether there is space between the pages. Unchanged when left out. |
spread | "single" | "two" | "cover" | no | single: one page a row; two: two pages a row (1-2, 3-4); cover: the first page alone, then 2-3, 4-5. Unchanged when left out. |
Call through pdf_run
text
pdf_run {
"path": "<file>.pdf",
"steps": [{ "command": "view.setLayout" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: continuous, gaps, spread. pdf_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
continuous | boolean | no | Whether the rows scroll one under the other. |
gaps | boolean | no | Whether there is space between the pages. |
spread | string | no | single, two or cover. |
Result JSON Schema
json
{
"additionalProperties": false,
"properties": {
"continuous": {
"description": "Whether the rows scroll one under the other.",
"type": "boolean"
},
"gaps": {
"description": "Whether there is space between the pages.",
"type": "boolean"
},
"spread": {
"description": "single, two or cover.",
"type": "string"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"continuous": {
"description": "true: the rows one under the other, scrolled through; false: a row at a time. Unchanged when left out.",
"type": "boolean"
},
"gaps": {
"description": "Whether there is space between the pages. Unchanged when left out.",
"type": "boolean"
},
"spread": {
"description": "single: one page a row; two: two pages a row (1-2, 3-4); cover: the first page alone, then 2-3, 4-5. Unchanged when left out.",
"enum": [
"single",
"two",
"cover"
],
"type": "string"
}
},
"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.