Layout kit command
layout.documentSetup
Document Setup
Sets the document's page size, page count, start page, facing pages, binding, bleed and slug.
- Kit
- Layout 0.1.0 (.klayout)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
adjustLayout | boolean | no | objects follow the new page size |
binding | "leftToRight" | "rightToLeft" | no | |
bleed | number | no | points |
facingPages | boolean | no | |
height | number | no | |
intent | "print" | "web" | "mobile" | no | |
pages | integer | no | |
slug | number | number[] | no | |
startPage | integer | no | |
width | number | no |
Call through layout_run
text
layout_run {
"path": "<file>.klayout",
"steps": [{ "command": "layout.documentSetup" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: adjustLayout, binding, bleed, facingPages, height, intent, pages, slug, startPage, width. layout_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": {
"adjustLayout": {
"description": "objects follow the new page size",
"type": "boolean"
},
"binding": {
"enum": [
"leftToRight",
"rightToLeft"
],
"type": "string"
},
"bleed": {
"description": "points",
"type": "number"
},
"facingPages": {
"type": "boolean"
},
"height": {
"type": "number"
},
"intent": {
"enum": [
"print",
"web",
"mobile"
],
"type": "string"
},
"pages": {
"type": "integer"
},
"slug": {
"oneOf": [
{
"description": "points on every side",
"type": "number"
},
{
"description": "[top, left, bottom, right] points",
"items": {
"type": "number"
},
"type": "array"
}
]
},
"startPage": {
"type": "integer"
},
"width": {
"type": "number"
}
},
"returns": "the document setup",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (layout_commands through @kition/[email protected], built from KitionAI/kition-layout@8767a18). As data: commands.jsonl.