---
title: "page.layout: Read the page layout — Note kit command — Kition"
description: "Answers how the note prints on `letter` or `a4` pages: the page count, where each block lands (page, x, y, width, height in points), blocks too wide for the column, and what the pages cannot draw. Use it to check page breaks before exporting a PDF."
canonical: "https://developer.kition.ai/docs/kits/note/commands/page.layout"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/note/commands/page.layout](https://developer.kition.ai/docs/kits/note/commands/page.layout)

# page.layout

**Read the page layout.** Answers how the note prints on `letter` or `a4` pages: the page count, where each block lands (page, x, y, width, height in points), blocks too wide for the column, and what the pages cannot draw. Use it to check page breaks before exporting a PDF.

- Kit: Note 0.3.0 (Markdown (.md)); reference: [Note kit commands](https://developer.kition.ai/docs/kits/note.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | `integer` | no | Only the blocks placed on this page, from 1. |
| `pageSize` | `"letter" \| "a4"` | no | The page size. |

## Call through note_run

```text
note_run {
  "path": "<file>.md",
  "steps": [{ "command": "page.layout" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `page`, `pageSize`. note_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `blocks` | `object[]` | yes | Where each block (or the given page's blocks) lands, at most 500. |
| `overflow` | `object[]` | yes | Blocks wider than the page's column: a code line wrapped, a table squeezed. |
| `pageSize` | `object` | yes | The page size in points. |
| `pages` | `integer` | yes | How many pages the note prints on. |
| `unsupported` | `object` | yes | What the pages could not draw as the editor shows it. |

```json
{
  "additionalProperties": false,
  "properties": {
    "blocks": {
      "description": "Where each block (or the given page's blocks) lands, at most 500.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "height": {
            "description": "Points.",
            "type": "number"
          },
          "kind": {
            "description": "What the block is, for example paragraph, heading, list, quote, code, table, math or rule.",
            "type": "string"
          },
          "line": {
            "description": "The block's first line, from 1.",
            "type": "integer"
          },
          "page": {
            "description": "The page, from 1.",
            "type": "integer"
          },
          "width": {
            "description": "Points.",
            "type": "number"
          },
          "x": {
            "description": "Its left edge on the page, in points.",
            "type": "number"
          },
          "y": {
            "description": "Its top edge on the page, in points.",
            "type": "number"
          }
        },
        "required": [
          "height",
          "kind",
          "line",
          "page",
          "width",
          "x",
          "y"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "overflow": {
      "description": "Blocks wider than the page's column: a code line wrapped, a table squeezed.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "description": "code or table.",
            "type": "string"
          },
          "line": {
            "description": "The block's first line, from 1.",
            "type": "integer"
          },
          "page": {
            "description": "The page, from 1.",
            "type": "integer"
          },
          "width": {
            "description": "The width it needs, in points.",
            "type": "number"
          }
        },
        "required": [
          "kind",
          "line",
          "page",
          "width"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "pageSize": {
      "additionalProperties": false,
      "description": "The page size in points.",
      "properties": {
        "height": {
          "description": "Points.",
          "type": "number"
        },
        "width": {
          "description": "Points.",
          "type": "number"
        }
      },
      "required": [
        "height",
        "width"
      ],
      "type": "object"
    },
    "pages": {
      "description": "How many pages the note prints on.",
      "type": "integer"
    },
    "unsupported": {
      "additionalProperties": false,
      "description": "What the pages could not draw as the editor shows it.",
      "properties": {
        "embeds": {
          "description": "Embeds drawn as labelled boxes.",
          "type": "integer"
        },
        "html": {
          "description": "HTML blocks drawn as their source.",
          "type": "integer"
        },
        "images": {
          "description": "Images drawn as labelled boxes.",
          "type": "integer"
        },
        "math": {
          "description": "Math drawn as its source.",
          "type": "integer"
        },
        "mermaid": {
          "description": "Mermaid diagrams drawn as their source.",
          "type": "integer"
        },
        "missingGlyphs": {
          "description": "Characters drawn as boxes: no page font has them.",
          "type": "integer"
        },
        "missingSample": {
          "description": "Up to 24 of those characters, in order of first use.",
          "type": "string"
        }
      },
      "required": [
        "embeds",
        "html",
        "images",
        "math",
        "mermaid",
        "missingGlyphs",
        "missingSample"
      ],
      "type": "object"
    }
  },
  "required": [
    "blocks",
    "overflow",
    "pageSize",
    "pages",
    "unsupported"
  ],
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "page": {
      "description": "Only the blocks placed on this page, from 1.",
      "type": "integer"
    },
    "pageSize": {
      "default": "letter",
      "description": "The page size.",
      "enum": [
        "letter",
        "a4"
      ],
      "type": "string"
    }
  },
  "type": "object"
}
```

Generated from kition-sdk packages/script/kits/note.ts and the kit itself (kition-note@69e14d9).
