---
title: "file.removeHidden: Remove hidden information / Sanitize — PDF kit command — Kition"
description: "Remove the listed categories (see file.getHiddenInfo), or every category when none are listed (Sanitize Document). Form fields are flattened so their values stay visible. The next save rewrites the whole file. Undoable until saved."
canonical: "https://developer.kition.ai/docs/kits/pdf/commands/file.removeHidden"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/pdf/commands/file.removeHidden](https://developer.kition.ai/docs/kits/pdf/commands/file.removeHidden)

# file.removeHidden

**Remove hidden information / Sanitize.** Remove the listed categories (see file.getHiddenInfo), or every category when none are listed (Sanitize Document). Form fields are flattened so their values stay visible. The next save rewrites the whole file. Undoable until saved.

- Kit: PDF 0.1.0 (.pdf); reference: [PDF kit commands](https://developer.kition.ai/docs/kits/pdf.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `categories` | `("metadata" \| "attachments" \| "comments" \| "form-fields" \| "hidden-text" \| "hidden-layers" \| "bookmarks" \| "links-actions-scripts" \| "private-data")[]` | no |  |

## Call through pdf_run

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

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

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "categories": {
      "items": {
        "enum": [
          "metadata",
          "attachments",
          "comments",
          "form-fields",
          "hidden-text",
          "hidden-layers",
          "bookmarks",
          "links-actions-scripts",
          "private-data"
        ],
        "type": "string"
      },
      "type": "array"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/pdf-darwin-arm64@0.1.0 and the kit itself (pdf_commands through @kition/cli@0.1.1, built from KitionAI/kition-pdf@b0d2725).
