---
title: "content.set: Edit added content — PDF kit command — Kition"
description: "Move/resize (rect), retype (text) or restyle (font, size, bold, italic, color, align) an added item (page, index from content.list). Images: rotate (degrees, multiple of 90, counter-clockwise), flipH / flipV (toggle), crop [left, bottom, right, top] as fractions trimmed, image (a file that replaces the picture). Undoable."
canonical: "https://developer.kition.ai/docs/kits/pdf/commands/content.set"
---

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

# content.set

**Edit added content.** Move/resize (rect), retype (text) or restyle (font, size, bold, italic, color, align) an added item (page, index from content.list). Images: rotate (degrees, multiple of 90, counter-clockwise), flipH / flipV (toggle), crop [left, bottom, right, top] as fractions trimmed, image (a file that replaces the picture). 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 |
| --- | --- | --- | --- |
| `align` | `"left" \| "center" \| "right" \| "justify"` | no |  |
| `bold` | `boolean` | no |  |
| `color` | `string` | no |  |
| `crop` | `number[]` | no | (maxItems 4, minItems 4) |
| `flipH` | `boolean` | no |  |
| `flipV` | `boolean` | no |  |
| `font` | `"helvetica" \| "times" \| "courier"` | no |  |
| `index` | `integer` | yes | (minimum 1) |
| `italic` | `boolean` | no |  |
| `page` | `integer` | yes | (minimum 1) |
| `rect` | `number[]` | no | (maxItems 4, minItems 4) |
| `rotate` | `integer` | no |  |
| `size` | `number` | no | (maximum 500, minimum 1) |
| `text` | `string` | no |  |

## Call through pdf_run

```text
pdf_run {
  "path": "<file>.pdf",
  "steps": [{ "command": "content.set", "params": { "index": <integer>, "page": <integer> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `align`, `bold`, `color`, `crop`, `flipH`, `flipV`, `font`, `italic`, `rect`, `rotate`, `size`, `text`. 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": {
    "align": {
      "enum": [
        "left",
        "center",
        "right",
        "justify"
      ],
      "type": "string"
    },
    "bold": {
      "type": "boolean"
    },
    "color": {
      "type": "string"
    },
    "crop": {
      "description": "(maxItems 4, minItems 4)",
      "items": {
        "description": "(maximum 0.49, minimum 0)",
        "type": "number"
      },
      "type": "array"
    },
    "flipH": {
      "type": "boolean"
    },
    "flipV": {
      "type": "boolean"
    },
    "font": {
      "enum": [
        "helvetica",
        "times",
        "courier"
      ],
      "type": "string"
    },
    "index": {
      "description": "(minimum 1)",
      "type": "integer"
    },
    "italic": {
      "type": "boolean"
    },
    "page": {
      "description": "(minimum 1)",
      "type": "integer"
    },
    "rect": {
      "description": "(maxItems 4, minItems 4)",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "rotate": {
      "type": "integer"
    },
    "size": {
      "description": "(maximum 500, minimum 1)",
      "type": "number"
    },
    "text": {
      "type": "string"
    }
  },
  "required": [
    "index",
    "page"
  ],
  "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).
