This project provides a Python script for removing encryption from PDF files. The tool can handle PDFs that are encrypted with or without a password. It includes a graphical user interface built with tkinter for easy use.
- Modern GUI: User-friendly interface with improved styling, colors, and layout.
- Batch Processing: Process multiple PDFs at once with progress tracking.
- Password Support: Handles encrypted PDFs with optional password input.
- Progress Tracking: Real-time progress bar and status updates during processing.
- Error Handling: Comprehensive error handling with user-friendly messages.
- Command-Line Interface: Full CLI support for automation and scripting.
- Python 3.6+
PyMuPDF(pymupdf): For handling PDF files.tkinter: For the graphical user interface (comes with Python standard library).
-
Clone the repository:
git clone https://github.com/oop7/pdf-encryption-remover.git cd pdf-encryption-remover -
Install required dependencies:
pip install -r requirements.txt
Run the GUI application:
python main.pyFor headless or automated use:
python main.py input.pdf output.pdf [-p PASSWORD]Batch processing:
python main.py input_directory output_directory -d [-p PASSWORD]Examples:
# Single file without password
python main.py encrypted.pdf decrypted.pdf
# Single file with password
python main.py encrypted.pdf decrypted.pdf -p mypassword
# Batch process directory
python main.py /path/to/pdfs /path/to/output -d- Batch Mode: Check "Batch Mode" to process multiple PDFs in a directory (labels will update automatically).
- File Selection: Click "Browse" next to "Input" to select your PDF file or directory.
- Output Location: Click "Browse" next to "Output" to choose where to save the decrypted file(s).
- Password: Enter a password if your PDF(s) are encrypted (leave blank if not encrypted).
- Process: Click "Remove Encryption" to start processing.
- Monitor Progress: Watch the progress bar and status updates during processing.
- A success message will appear when processing is complete.
- File not found: Ensure the input PDF path is correct and the file exists.
- Incorrect password: If the PDF is encrypted, provide the correct password.
- Permission denied: Make sure you have write permissions for the output directory.
- PDF not encrypted: The tool will still create a copy without encryption.
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is intended for legal and ethical use only. It must only be used on PDF files that you own or have explicit permission to modify. The authors are not responsible for any misuse of this software.