# SecurityApi.removeProtection()

```ts
removeProtection(options?: SignedDocumentOptions): Promise<void>
```

Removes encryption. Refuses a signed document, as Acrobat refuses, unless `options.invalidateSignatures`. Needs the `export` feature.

- Kind: method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `options?` | `SignedDocumentOptions` | `{ invalidateSignatures? }`. |

Returns `Promise<void>`

Throws:

- `INVALID_STATE` — a signed document, unless `options.invalidateSignatures`; or a progressive document still downloading.
- `FEATURE_NOT_LICENSED` — the license lacks `export`.
- `DOCUMENT_CLOSED` — the document has been closed.

```ts
await doc.security.removeProtection();
const plain = await doc.save();
```

Part of [SecurityApi](https://kernstra.com/docs/web-sdk/api/doc-security) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/doc-security/removeprotection
