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

Parameters of layout.documentSetup
NameTypeRequiredDescription
adjustLayoutbooleannoobjects follow the new page size
binding"leftToRight" | "rightToLeft"no
bleednumbernopoints
facingPagesbooleanno
heightnumberno
intent"print" | "web" | "mobile"no
pagesintegerno
slugnumber | number[]no
startPageintegerno
widthnumberno

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.