Layout kit command

file.place

Place

Places a graphic or text file (by path or base64) on a spread or into a frame, at a position and size, with the page of a PDF.

Kit
Layout 0.1.0 (.klayout)
Changes the document
yes

Parameters

Parameters of file.place
NameTypeRequiredDescription
autoflowbooleannoread by the command beside its listed parameters
base64anynoone of several alternative parameters
frameintegernoan id; place into
heightnumbernoread by the command beside its listed parameters
layoutPageintegernoIDML / .klayout: that page's objects as a group
namestringno
pageintegernoread by the command beside its listed parameters
pathstringnoone of several alternative parameters
pdfCrop"crop" | "trim" | "bleed" | "art" | "media"no
pdfPageintegerno1-based, Image Import Options
rectany[]noread by the command beside its listed parameters
spreadinteger | object | stringnothe spread (default spread 0); one that names no spread is refused
widthnumberno
xnumberno
ynumberno

Call through layout_run

text
layout_run {
  "path": "<file>.klayout",
  "steps": [{ "command": "file.place" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: autoflow, base64, frame, height, layoutPage, name, page, path, pdfCrop, pdfPage, rect, spread, width, x, y. 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": {
    "autoflow": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    },
    "base64": {
      "description": "one of several alternative parameters"
    },
    "frame": {
      "description": "an id; place into",
      "type": "integer",
      "x-khp-types": [
        "Item"
      ]
    },
    "height": {
      "description": "read by the command beside its listed parameters",
      "type": "number"
    },
    "layoutPage": {
      "description": "IDML / .klayout: that page's objects as a group",
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "page": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "path": {
      "description": "one of several alternative parameters",
      "type": "string",
      "x-khp-file": {
        "access": "read"
      }
    },
    "pdfCrop": {
      "enum": [
        "crop",
        "trim",
        "bleed",
        "art",
        "media"
      ],
      "type": "string"
    },
    "pdfPage": {
      "description": "1-based, Image Import Options",
      "type": "integer"
    },
    "rect": {
      "description": "read by the command beside its listed parameters",
      "type": "array"
    },
    "spread": {
      "description": "the spread (default spread 0); one that names no spread is refused",
      "oneOf": [
        {
          "description": "a spread counted from 0",
          "type": "integer"
        },
        {
          "additionalProperties": true,
          "description": "a spread reference {kind: doc|parent, index} (parent spreads counted from 0)",
          "type": "object"
        },
        {
          "description": "a parent spread's prefix or label, such as A or A-Parent",
          "type": "string"
        }
      ]
    },
    "width": {
      "type": "number"
    },
    "x": {
      "type": "number"
    },
    "y": {
      "type": "number"
    }
  },
  "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.