> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chromiumly.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Flatten PDFs

> Flatten forms and annotations into static content with PDFEngines.flatten.

Flattening turns interactive elements (form fields, annotations) into static content so the document looks the same everywhere and cannot be edited.

```typescript theme={null}
import { PDFEngines } from "chromiumly";

const buffer = await PDFEngines.flatten([
  "path/to/file_1.pdf",
  "path/to/file_2.pdf",
]);
```

Returns a single PDF buffer. You can also request flattening when splitting on Chromium or LibreOffice by setting `split: { ..., flatten: true }`, or use the `flatten` option on LibreOffice’s `convert()`.
