Click or drag to resize
Pdf Library for .NET

PdfSecurityManagerRemoveSecurity Method

Removes the document's security: both passwords are cleared, every permission is granted and the document is saved without encryption. Load an encrypted document with its password first.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.6
Syntax
public void RemoveSecurity()
Remarks
Setting a password afterwards encrypts the document again. Removing the security rewrites the file, so signatures the document carries no longer verify.
Example
PdfSecurityManager manager = new PdfSecurityManager();
manager.Load("encrypted.pdf", "owner456");
manager.RemoveSecurity();
manager.Save("unprotected.pdf");
manager.Close();
See Also