PDF kit command

file.getInfo

Inspect a document

Metadata, page sizes and labels, bookmarks, annotations, form fields, links, layers, attachments, fonts, security and repair notes.

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.getInfo" }]
}

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.getInfo
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.