Version 0.0.1
Easily download / decrypt PDFs using the command line.
This script automatically removes passwords using qpdf from local or remote .pdf files and stores the files to a folder. If you use a remote file it will delete existing files prior to downloading and the new file and the passworded version will not be stored.
In the end, this script here is nothing more than an easy to use wrapper for qpdf with a lot of overhead and only one function:
If you don't want this kind of overhead, simply run:
qpdf --decrypt --password="$v_pdfpassword" "$v_pdffile" "$PDFtarget"
- Please install qpdf prior to installing PDFDecrypt. QPDF is a great tool for handling PDFs. It can do much more than just mess with their passwords.
To install PDFDecrypt, simply clone this repository and add PDFDecrypt to your PATH.
git clone https://github.com/jancschaefer/PDFDecrypt.git
- Simply run
PDFDecrypt
in your shell. - You will be prompted to enter a path or URL.
- You will be prompted to enter a password for the PDF
- Your PDF will be decrypted, using qpdf.
- If you were using a local file, you will be asked whether the original file shall be removed
- Online files with filenames that included spaces > < or potentially other special characters will not be downloaded correctly and thus will not work when handed to qpdf.
I decided to publish this via the UNLICENSE. Do whatever you want with this. In case you make millions of dollars with it, kindly tell me about my mistake ¯\_(ツ)_/¯