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

# PDF encryption

> Protect PDFs with user and owner passwords using userPassword and ownerPassword.

Chromium converters and LibreOffice support PDF encryption via `userPassword` and `ownerPassword`:

* **userPassword** — Required to open the PDF.
* **ownerPassword** — Grants full access (e.g. printing, copying). If only `userPassword` is set, the document can still be opened with that password.

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

const buffer = await new UrlConverter().convert({
  url: "https://example.com/",
  userPassword: "open_secret",
  ownerPassword: "admin_secret",
});
```

Same options exist on `HtmlConverter`, `MarkdownConverter`, and `LibreOffice.convert()`. Screenshot routes also accept these parameters where the output is PDF.
