---
title: "bookmark.add: Add a bookmark — PDF kit command — Kition"
description: "Add a bookmark that goes to a page, under a parent bookmark (or at the top level), at a position. Undoable."
canonical: "https://developer.kition.ai/docs/kits/pdf/commands/bookmark.add"
---

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

# bookmark.add

**Add a bookmark.** Add a bookmark that goes to a page, under a parent bookmark (or at the top level), at a position. Undoable.

- 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 |
| --- | --- | --- | --- |
| `page` | `integer` | yes | (minimum 1) |
| `parent` | `integer[]` | no | Parent bookmark (omit for the top level): 1-based positions from the top level, e.g. [2, 1] = the first child of the second bookmark. |
| `position` | `integer` | no | 1-based position among the parent's children (default: last). (minimum 1) |
| `title` | `string` | yes | (minLength 1) |

## Call through pdf_run

```text
pdf_run {
  "path": "<file>.pdf",
  "steps": [{ "command": "bookmark.add", "params": { "page": <integer>, "title": <string> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `parent`, `position`. 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": {
    "page": {
      "description": "(minimum 1)",
      "type": "integer"
    },
    "parent": {
      "description": "Parent bookmark (omit for the top level): 1-based positions from the top level, e.g. [2, 1] = the first child of the second bookmark.",
      "items": {
        "description": "(minimum 1)",
        "type": "integer"
      },
      "type": "array"
    },
    "position": {
      "description": "1-based position among the parent's children (default: last). (minimum 1)",
      "type": "integer"
    },
    "title": {
      "description": "(minLength 1)",
      "type": "string"
    }
  },
  "required": [
    "page",
    "title"
  ],
  "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).
