Skip to main content

Secure a PDF

Unlock a password-protected PDF copy

Remove PDF Standard password security with a valid owner password, verify the result is unencrypted, and download a separate unlocked document.

Practical steps

Create an unprotected copy of an encrypted PDF

Authenticate with the owner password, remove Standard security, and verify the separate output.

  1. SelectChoose one Standard-security PDF that you are authorized to unlock.
  2. AuthenticateEnter the owner password required for privileged document changes.
  3. VerifyCreate a separate PDF and confirm that the output no longer reports encryption.

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.