Created
January 3, 2022 16:19
-
-
Save adamatan/243027a53b1c19ba639d43db8ca01f06 to your computer and use it in GitHub Desktop.
PDF in the CLI
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
#!/bin/bash | |
# Usage: | |
# PASSWORD='MY-SECRET-PASSWORD' ./decrypt_pdf.sh | |
mkdir -p decrypted | |
find . -type f -maxdepth 1 -name '*.pdf' -print0 | \ | |
xargs -0 -n 1 -I % \ | |
qpdf --decrypt --password=${PASSWORD} % decrypted/% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment