Skip to content

Instantly share code, notes, and snippets.

@misTrasteos
Created October 8, 2022 19:48
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 misTrasteos/65db9c33b3988df099cb0771744a37ff to your computer and use it in GitHub Desktop.
Save misTrasteos/65db9c33b3988df099cb0771744a37ff to your computer and use it in GitHub Desktop.
remove password from [a lot of ]pdf files
  • I am using Ubuntu latest

docker run --rm --name pdfs -it -v /pdfs:/pdfs -w /pdfs ubuntu:latest

  • Install pdftk
apt-get update
apt-get upgrade
apt-get install pdftk
  • you can chose whatever output pattern. More about this, here
for pdf in `ls`;do pdftk $pdf input_pw password output ${pdf:0:10}_WITHOUT_PASSWORD.PDF;done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment