PDF kit command

view.rotate

Rotate View

Turns how the pages are shown by a multiple of 90 degrees, clockwise or back, without changing the file: no page is rotated, nothing becomes unsaved and there is no undo step. Answers the view's rotation now.

Kit
PDF 0.1.0 (.pdf)
Changes the document
no

Parameters

Parameters of view.rotate
NameTypeRequiredDescription
degreesintegernoHow far to turn the view: a multiple of 90, clockwise; negative turns it counterclockwise (-90 is a quarter turn back). Defaults to 90.

Call through pdf_run

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

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

Result

Result of view.rotate
NameTypeRequiredDescription
rotationintegernoThe view's rotation now: 0, 90, 180 or 270 degrees clockwise.
Result JSON Schema
json
{
  "additionalProperties": false,
  "properties": {
    "rotation": {
      "description": "The view's rotation now: 0, 90, 180 or 270 degrees clockwise.",
      "type": "integer"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "degrees": {
      "default": 90,
      "description": "How far to turn the view: a multiple of 90, clockwise; negative turns it counterclockwise (-90 is a quarter turn back). Defaults to 90.",
      "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.