PDF kit command

file.auditSpace

Audit space usage

How many bytes each kind of content takes and its share of the file (PDF Optimizer ▸ Audit space usage): images, content streams, fonts, forms, comments, structure, bookmarks, … and document overhead.

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

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.auditSpace
NameTypeRequiredDescription
categoriesobject[]no
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "categories": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "bytes": {
            "type": "number"
          },
          "category": {
            "type": "string"
          },
          "percent": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "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.