# PdfSecurityOptions.userPassword Property

> PdfSecurityOptions.userPassword property in the TX Sheet Control TypeScript API for the browser: Password required to open the PDF.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > PdfSecurityOptions > PdfSecurityOptions.userPassword Property
- **340 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pdfsecurityoptions/userpassword-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pdfsecurityoptions/userpassword-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pdfsecurityoptions/userpassword-property/llms-full.txt

---

Password required to open the PDF; omitted or empty permits opening without a prompt.

Owner: [PdfSecurityOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pdfsecurityoptions/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

### Syntax

```typescript
userPassword?: string | undefined
```

Read through the owning object: `owner.userPassword`. Follow the declared mutability and owning object lifetime.

### Examples

Configure PdfSecurityOptions for an invoice or sales-report workflow. Supply font and document resources from the application where the example accepts them as inputs.

```typescript
import type { PdfSecurityOptions } from '@txtextcontrol/tx-sheet-control';

const pdfSecuritySettings: PdfSecurityOptions = { userPassword: 'Invoice' };
console.log(pdfSecuritySettings['userPassword']);
```

### Remarks

Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.

### See Also

- [PdfSecurityOptions Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pdfsecurityoptions/llms-full.txt)
- [Exporting Worksheets to PDF](https://docs.textcontrol.com/tx-sheet-control/pdf/export/llms-full.txt)

---

## Nearby

- **Previous:** [PdfSecurityOptions.permissions Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pdfsecurityoptions/permissions-property/llms-full.txt)
- **Next:** [PdfViewerPreferences Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pdfviewerpreferences/llms-full.txt)
