https://github.com/thiswillbeyourgithub/pdf_batch_decryptor
Super quick and dirty script to call "qpdf --decrypt" on all PDF files that `pdfinfo` deems encrypted
https://github.com/thiswillbeyourgithub/pdf_batch_decryptor
Last synced: 11 months ago
JSON representation
Super quick and dirty script to call "qpdf --decrypt" on all PDF files that `pdfinfo` deems encrypted
- Host: GitHub
- URL: https://github.com/thiswillbeyourgithub/pdf_batch_decryptor
- Owner: thiswillbeyourgithub
- License: gpl-3.0
- Created: 2024-08-14T14:49:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-25T09:22:06.000Z (over 1 year ago)
- Last Synced: 2025-02-09T06:43:11.778Z (about 1 year ago)
- Language: Python
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PDF Batch Decryptor
Super quick and dirty script to call "qpdf --decrypt" on all PDF files that `pdfinfo` deems encrypted.
## Usage
1. Ensure you have the required dependencies installed:
- Python 3.x
- qpdf
- pdfinfo (usually part of the poppler-utils package)
2. Install the Python dependencies:
```
pip install fire tqdm send2trash
```
3. Run the script with the path to the directory containing PDF files:
```
python PDF_batch_decryptor.py /path/to/pdf/directory
```
4. The script will:
- Check each PDF file for encryption
- Ask if you want to decrypt each encrypted file
- Decrypt the files you choose to decrypt
- Move the original encrypted files to a trash directory
- Generate a JSON file with information about the processed PDFs
Note: Make sure you have the necessary permissions to read and write files in the specified directory.