PDF kit command

page.render

Render a page

Render one page to a PNG image (default 96 dpi, at most 600).

Kit
PDF 0.1.0 (.pdf)
Changes the document
no

Parameters

Parameters of page.render
NameTypeRequiredDescription
dpinumberno(maximum 600, minimum 1)
pageintegeryes(minimum 1)

Call through pdf_run

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

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

Result

Result of page.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": {
    "dpi": {
      "description": "(maximum 600, minimum 1)",
      "type": "number"
    },
    "page": {
      "description": "(minimum 1)",
      "type": "integer"
    }
  },
  "required": [
    "page"
  ],
  "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.