Skip to content

Instantly share code, notes, and snippets.

@raghur
Last active August 5, 2025 07:44
Show Gist options
  • Save raghur/f3eab7297691f2f411eec69b8032daf0 to your computer and use it in GitHub Desktop.
Save raghur/f3eab7297691f2f411eec69b8032daf0 to your computer and use it in GitHub Desktop.
QPDF command to remove file restrictions from password protected pdf file.
# remove pdf file restrictions from password protected pdf file.
qpdf.exe --decrypt --password=verysecret input.pdf output.pdf
@mmsaffari
Copy link

The command changes the password; to actually remove the password, I used this in a PowerShell console.
qpdf.exe --decrypt --password="" input.pdf output.pdf

@Sivaguru1998
Copy link

qpdf --decrypt locked.pdf unlocked.pdf

@Tmony117
Copy link

Does not work without password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment