Skip to content

Instantly share code, notes, and snippets.

@all3kcis
Forked from endolith/readme.md
Created September 30, 2019 14:27
Show Gist options
  • Save all3kcis/542d41ac30016ab73a14b10af226ed94 to your computer and use it in GitHub Desktop.
Save all3kcis/542d41ac30016ab73a14b10af226ed94 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