Skip to content

Instantly share code, notes, and snippets.

@endolith
Last active January 8, 2021 15:02
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save endolith/e96eb75ad70d7a7e97ef to your computer and use it in GitHub Desktop.
Save endolith/e96eb75ad70d7a7e97ef to your computer and use it in GitHub Desktop.
Unlock PDF restrictions shortcut for Windows

Install QPDF, and then edit this batch file with the correct path and create a shortcut to this batch file. Then you can Open With the shortcut file for quick access and it creates an unlocked version of a locked PDF in the same folder as the original.

@ECHO OFF
: Remove PDF copying and printing restrictions
"C:\path-to-file-or-it-wont-work\qpdf-5.1.2\bin\qpdf.exe" %1 --decrypt "%~dpn1.unlocked.pdf"
echo Restrictions removed
echo %~dpn1.unlocked.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment