Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

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.

Unlock summary
Input
Protected PDF and owner password
Output
Unprotected PDF
Runs on
Browser-local WebAssembly or .NET
Microsoft Office
Not required
License
MIT

A valid owner password is required; OfficeIMO does not bypass or recover unknown credentials.

Browse all PDF workflows

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 PdfLoadOptions { Password = ownerPassword };
PdfDocument source = PdfDocument.Load("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.

Example source

Download source