Skip to content

Instantly share code, notes, and snippets.

@BlkPingu
Last active February 19, 2022 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BlkPingu/1a462672e44e55805df501e0aab7340c to your computer and use it in GitHub Desktop.
Save BlkPingu/1a462672e44e55805df501e0aab7340c to your computer and use it in GitHub Desktop.
Remove Passwords from all PDF in folder
// single pdf
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=uncrypted.pdf -c .setpdfwrite -f target.pdf
// all pdf in folder
mkdir ../uncrypted && find . -type f -name "*.pdf" -exec gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=../uncrypted/{} -c .setpdfwrite -f {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment