PDF kit command

file.inspect

Inspect open documents

With doc, return file.getInfo; otherwise return information for every open document (empty documents array when none are open).

Kit
PDF 0.1.0 (.pdf)
Changes the document
no

Parameters

None.

Call through pdf_run

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

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

Result

Result of file.inspect
NameTypeRequiredDescription
annotationsany[]no
attachmentsany[]no
authoranyno
creatoranyno
documentobjectno
fieldsany[]no
file_sizenumberno
fontsany[]no
has_javascriptbooleanno
keywordsanyno
layersany[]no
linksany[]no
outlineany[]no
outline_morebooleanno
pagesobject[]no
pdf_versionstringno
produceranyno
repairsany[]no
securityobjectno
subjectanyno
taggedbooleanno
titleanyno
warningsany[]no
xfaanyno
xfa_layoutanyno
xfa_warningsany[]no
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "annotations": {
      "type": "array"
    },
    "attachments": {
      "type": "array"
    },
    "author": {},
    "creator": {},
    "document": {
      "additionalProperties": true,
      "properties": {
        "dirty": {
          "type": "boolean"
        },
        "doc": {
          "type": "number"
        },
        "editable": {
          "type": "boolean"
        },
        "encrypted": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "pages": {
          "type": "number"
        },
        "path": {},
        "read_only_reason": {},
        "redo": {},
        "undo": {}
      },
      "type": "object"
    },
    "fields": {
      "type": "array"
    },
    "file_size": {
      "type": "number"
    },
    "fonts": {
      "type": "array"
    },
    "has_javascript": {
      "type": "boolean"
    },
    "keywords": {},
    "layers": {
      "type": "array"
    },
    "links": {
      "type": "array"
    },
    "outline": {
      "type": "array"
    },
    "outline_more": {
      "type": "boolean"
    },
    "pages": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "height": {
            "type": "number"
          },
          "label": {
            "type": "string"
          },
          "page": {
            "type": "number"
          },
          "rotation": {
            "type": "number"
          },
          "width": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "pdf_version": {
      "type": "string"
    },
    "producer": {},
    "repairs": {
      "type": "array"
    },
    "security": {
      "additionalProperties": true,
      "properties": {
        "protected": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "subject": {},
    "tagged": {
      "type": "boolean"
    },
    "title": {},
    "warnings": {
      "type": "array"
    },
    "xfa": {},
    "xfa_layout": {},
    "xfa_warnings": {
      "type": "array"
    }
  },
  "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.