# Sanitization

The {mod}`pikepdf.sanitize` module provides curated, low-risk helpers for
removing active or auxiliary content from a PDF. See {ref}`sanitize` for a
discussion of when to use them and the limits of programmatic sanitization.

```{eval-rst}
.. autoapimodule:: pikepdf.sanitize
```

```{eval-rst}
.. autoapifunction:: pikepdf.sanitize.remove_javascript
```

```{eval-rst}
.. autoapifunction:: pikepdf.sanitize.remove_attachments
```

```{eval-rst}
.. autoapifunction:: pikepdf.sanitize.remove_external_access
```

```{eval-rst}
.. autoapifunction:: pikepdf.sanitize.remove_thumbnails
```

```{eval-rst}
.. autoapifunction:: pikepdf.sanitize.remove_search_index
```

```{eval-rst}
.. autoapifunction:: pikepdf.sanitize.remove_multimedia
```

```{eval-rst}
.. autoapifunction:: pikepdf.sanitize.remove_web_capture
```

```{eval-rst}
.. autoapifunction:: pikepdf.sanitize.remove_private_app_data
```

```{eval-rst}
.. autoapifunction:: pikepdf.sanitize.remove_collection
```

```{eval-rst}
.. autoapiclass:: pikepdf.sanitize.Sanitizer
    :members:
```
