---
title: "measure.perimeter: Measure perimeter — PDF kit command — Kition"
description: "Add an undoable connected-line length annotation. To include a closing edge, repeat the first point at the end."
canonical: "https://developer.kition.ai/docs/kits/pdf/commands/measure.perimeter"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/pdf/commands/measure.perimeter](https://developer.kition.ai/docs/kits/pdf/commands/measure.perimeter)

# 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); reference: [PDF kit commands](https://developer.kition.ai/docs/kits/pdf.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `author` | `string` | no | (maxLength 512) |
| `label` | `string` | no | (maxLength 512) |
| `page` | `integer` | yes | (minimum 1) |
| `points` | `number[][]` | 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/pdf-darwin-arm64@0.1.0 and the kit itself (pdf_commands through @kition/cli@0.1.1, built from KitionAI/kition-pdf@b0d2725).
