---
title: "table.draw: Draw Table — Doc kit command — Kition"
description: "Draws a table or a cell border as a pen stroke between two points on a page."
canonical: "https://developer.kition.ai/docs/kits/doc/commands/table.draw"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/doc/commands/table.draw](https://developer.kition.ai/docs/kits/doc/commands/table.draw)

# table.draw

**Draw Table.** Draws a table or a cell border as a pen stroke between two points on a page.

- Kit: Doc 0.1.0 (.docx); reference: [Doc kit commands](https://developer.kition.ai/docs/kits/doc.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | `integer` | no |  |
| `story` | `"body" \| object` | no | "body", or {"part": n} for a header, footer, note, comment or text box story |
| `x0` | `number` | no | points |
| `x1` | `number` | no | points |
| `y0` | `number` | no | points |
| `y1` | `number` | no | points |

## Call through doc_run

```text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "table.draw" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `page`, `story`, `x0`, `x1`, `y0`, `y1`. doc_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": {
    "page": {
      "type": "integer"
    },
    "story": {
      "description": "\"body\", or {\"part\": n} for a header, footer, note, comment or text box story",
      "oneOf": [
        {
          "enum": [
            "body"
          ],
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "part": {
              "description": "header, footer, footnote, endnote, comment or text box story number",
              "type": "integer"
            }
          },
          "type": "object"
        }
      ]
    },
    "x0": {
      "description": "points",
      "type": "number"
    },
    "x1": {
      "description": "points",
      "type": "number"
    },
    "y0": {
      "description": "points",
      "type": "number"
    },
    "y1": {
      "description": "points",
      "type": "number"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/doc-darwin-arm64@0.1.0 and the kit itself (doc_commands through @kition/cli@0.1.1, built from KitionAI/kition-doc@41e14a8).
