Web SDKv1.0.0

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

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

Example

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

More in SecurityApi