PDF kit command
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)
- 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
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 |
Result JSON Schema
{
"additionalProperties": true,
"properties": {
"image": {
"additionalProperties": true,
"properties": {
"height": {
"type": "number"
},
"width": {
"type": "number"
}
},
"type": "object"
}
},
"type": "object"
}Parameter schema
{
"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/[email protected] and the kit itself (pdf_commands through @kition/[email protected], built from KitionAI/kition-pdf@b0d2725). As data: commands.jsonl.