Forum Discussion
How to delete password from pdf on Windows as it is password protected?
Windows PowerShell is a native Windows scripting shell that uses local Adobe Reader COM components to offer a built-in automated script way to delete password from pdf without manual graphical unlocking for single encrypted PDF files.
How to Remove Password from PDF
Step 1: Right-click the Start menu and run Windows PowerShell as an administrator.
Step 2: Copy and paste the following script block into the PowerShell window:
$pdf = New-Object -ComObject AcroExch.PDDoc
$pdf.Open(“C:\path\to\input.pdf”)
$pdf.Save(1, “C:\path\to\output.pdf”)
$pdf.Close()
Step 3: Replace the input and output file paths within the quotes with the actual locations where your PDF files are stored.
Step 4: Press Enter to run the script; the tool will generate a new, unencrypted PDF file.
Finally, navigate to the specified output path to access the password-free PDF document.
This is because all modern Windows systems come with PowerShell preinstalled. However, the script relies on locally installed Adobe software; if the required COM components are missing, the script will not run.
Pros
- All decryption operations are performed locally and offline; no PDF data is uploaded to the cloud.
- The script is concise and compact, requires minimal configuration, and is suitable for unlocking a single PDF file.
- After removing password protection, the original PDF’s layout and formatting are preserved.
Cons
- By default, it supports only single-file processing; batch decryption requires additional coding.
- PowerShell must be run as an administrator to avoid component access errors.
- It cannot bypass unknown PDF passwords; you must know the correct open password in advance.