PDF kit command

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)
Changes the document
no

Parameters

Parameters of file.render
NameTypeRequiredDescription
maxSideintegerno(maximum 4096, minimum 1)
pageintegerno(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

Result of file.render
NameTypeRequiredDescription
imageobjectno
Result JSON Schema
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/[email protected] and the kit itself (pdf_commands through @kition/[email protected], built from KitionAI/kition-pdf@b0d2725). As data: commands.jsonl.