---
title: "comment.previewImage: Preview image signature layers — PDF kit command — Kition"
description: "Return a PNG of the page without the selected image signature/initials (layer=background, default), or its embedded image with alpha (layer=image). Includes the displayed rectangle, document rotation, image_rotation (how far clockwise the image is shown turned) and annotation opacity. Cache these layers for live placement/resizing; commit once with comment.edit. Does not change the document or undo history."
canonical: "https://developer.kition.ai/docs/kits/pdf/commands/comment.previewImage"
---

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

# comment.previewImage

**Preview image signature layers.** Return a PNG of the page without the selected image signature/initials (layer=background, default), or its embedded image with alpha (layer=image). Includes the displayed rectangle, document rotation, image_rotation (how far clockwise the image is shown turned) and annotation opacity. Cache these layers for live placement/resizing; commit once with comment.edit. Does not change the document or undo history.

- Kit: PDF 0.1.0 (.pdf); reference: [PDF kit commands](https://developer.kition.ai/docs/kits/pdf.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `dpi` | `number` | no | (maximum 600, minimum 1) |
| `id` | `string` | no | The comment's id (from comment.list). |
| `index` | `integer` | no | 1-based position on the page, as comment.list reports. (minimum 1) |
| `layer` | `"background" \| "image"` | no |  |
| `page` | `integer` | no | With `index`, instead of `id`. (minimum 1) |

## Call through pdf_run

```text
pdf_run {
  "path": "<file>.pdf",
  "steps": [{ "command": "comment.previewImage" }]
}
```

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

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `image` | `object` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "image": {
      "additionalProperties": true,
      "properties": {
        "height": {
          "type": "number"
        },
        "width": {
          "type": "number"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "dpi": {
      "default": 96,
      "description": "(maximum 600, minimum 1)",
      "type": "number"
    },
    "id": {
      "description": "The comment's id (from comment.list).",
      "type": "string"
    },
    "index": {
      "description": "1-based position on the page, as comment.list reports. (minimum 1)",
      "type": "integer"
    },
    "layer": {
      "default": "background",
      "enum": [
        "background",
        "image"
      ],
      "type": "string"
    },
    "page": {
      "description": "With `index`, instead of `id`. (minimum 1)",
      "type": "integer"
    }
  },
  "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).
