PDF kit command
measure.area
Measure area
Add an undoable area annotation from a simple polygon. The last edge closes automatically.
- Kit
- PDF 0.1.0 (.pdf)
- 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.area", "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.