---
title: "file.render: Render a preview — PDF kit command — Kition"
description: "Render a PNG bounded by maxSide (default 1024), without changing or saving the document. Page defaults to 1; doc may be omitted when exactly one document is open."
canonical: "https://developer.kition.ai/docs/kits/pdf/commands/file.render"
---

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

# file.render

**Render a preview.** Render a PNG bounded by maxSide (default 1024), without changing or saving the document. Page defaults to 1; doc may be omitted when exactly one document is open.

- 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 |
| --- | --- | --- | --- |
| `maxSide` | `integer` | no | (maximum 4096, minimum 1) |
| `page` | `integer` | no | (minimum 1) |

## Call through pdf_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `maxSide`, `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": {
    "maxSide": {
      "description": "(maximum 4096, minimum 1)",
      "type": "integer"
    },
    "page": {
      "description": "(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).
