PDF kit command

measure.perimeter

Measure perimeter

Add an undoable connected-line length annotation. To include a closing edge, repeat the first point at the end.

Kit
PDF 0.1.0 (.pdf)
Changes the document
yes

Parameters

Parameters of measure.perimeter
NameTypeRequiredDescription
authorstringno(maxLength 512)
labelstringno(maxLength 512)
pageintegeryes(minimum 1)
pointsnumber[][]yes(maxItems 2048, minItems 1)

Call through pdf_run

text
pdf_run {
  "path": "<file>.pdf",
  "steps": [{ "command": "measure.perimeter", "params": { "page": <integer>, "points": <number[][]> } }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: author, label. pdf_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": {
    "author": {
      "description": "(maxLength 512)",
      "type": "string"
    },
    "label": {
      "description": "(maxLength 512)",
      "type": "string"
    },
    "page": {
      "description": "(minimum 1)",
      "type": "integer"
    },
    "points": {
      "description": "(maxItems 2048, minItems 1)",
      "items": {
        "description": "[x, y] in points from the top-left of the displayed page. (maxItems 2, minItems 2)",
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    }
  },
  "required": [
    "page",
    "points"
  ],
  "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.