Unlocking decrypts an authorized PDF and writes a new document without Standard password security. The browser never overwrites the protected source.
Unlock from .NET
using OfficeIMO.Pdf;
const string ownerPassword = "owner-password";
var readOptions = new PdfReadOptions { Password = ownerPassword };
PdfDocument source = PdfDocument.Open("statement.protected.pdf", readOptions);
PdfSecurityMutationResult result = source.Security.Decrypt(ownerPassword);
File.WriteAllBytes("statement.unlocked.pdf", result.Pdf);
Console.WriteLine($"Encrypted: {result.IsEncrypted}");
The password is required both to open the encrypted content and to authorize removal of security. Keep it out of source, command history, telemetry, and exception messages.
Authorization boundary
OfficeIMO does not guess, recover, or bypass unknown passwords. If the caller lacks the owner credential or permission to remove protection, the correct result is a blocked workflow rather than a weakened file.