Last active
June 20, 2022 02:19
-
-
Save kevcjones-archived/4483127 to your computer and use it in GitHub Desktop.
Unlocking a PDF using ghostscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
required - install ghost script - e.g brew install ghostscript (takes a few minutes) | |
update this line as needed and run in terminal | |
-- New and updated thanks to comments -- | |
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -SPDFPassword=THE_PASSWORD -sOutputFile=unencrypted.pdf -c .setpdfwrite -f 2017-06-13-11-55-56-188_14972345156188_XXXPT6345X_ITRV.pdf | |
-- Original -- | |
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Exactly what @mustaqimM said. Thanks, @denysvega! Worked for me too.