SecurityApi.removeProtection()
Removes encryption. Refuses a signed document, as Acrobat refuses, unless
options.invalidateSignatures. Needs the export feature.methodProtectionsince 1.0.0
Signature
removeProtection(options?: SignedDocumentOptions): Promise<void>
Parameters
| Parameter | Type | Description |
|---|---|---|
| options? | SignedDocumentOptions | { invalidateSignatures? }. |
Returns
Promise<void>
Throws
INVALID_STATE— a signed document, unlessoptions.invalidateSignatures; or a progressive document still downloading.FEATURE_NOT_LICENSED— the license lacksexport.DOCUMENT_CLOSED— the document has been closed.
Example
TypeScript
await doc.security.removeProtection(); const plain = await doc.save();