https://github.com/oop7/pdf-encryption-remover
This project provides a set of Python scripts for removing encryption from PDF files. The tool can handle PDFs that are encrypted but do not require a password for opening
https://github.com/oop7/pdf-encryption-remover
encryption gui pdf pdf-tools python security tkinter
Last synced: 3 days ago
JSON representation
This project provides a set of Python scripts for removing encryption from PDF files. The tool can handle PDFs that are encrypted but do not require a password for opening
- Host: GitHub
- URL: https://github.com/oop7/pdf-encryption-remover
- Owner: oop7
- License: mit
- Created: 2024-07-27T09:44:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-27T21:28:49.000Z (about 1 year ago)
- Last Synced: 2025-01-27T22:31:37.308Z (about 1 year ago)
- Topics: encryption, gui, pdf, pdf-tools, python, security, tkinter
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PDF Encryption Remover
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.
## 💪 Features
- **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.
## 📄 Requirements
- Python 3.6+
- `PyMuPDF` (pymupdf): For handling PDF files.
- `tkinter`: For the graphical user interface (comes with Python standard library).
## 🔽 Installation
1. Clone the repository:
```bash
git clone https://github.com/oop7/pdf-encryption-remover.git
cd pdf-encryption-remover
```
2. Install required dependencies:
```bash
pip install -r requirements.txt
```
## 💻 Usage
### GUI Mode (Default)
Run the GUI application:
```bash
python main.py
```
### Command-Line Mode
For headless or automated use:
```bash
python main.py input.pdf output.pdf [-p PASSWORD]
```
Batch processing:
```bash
python main.py input_directory output_directory -d [-p PASSWORD]
```
Examples:
```bash
# 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
```
### How to Use GUI:
1. **Batch Mode**: Check "Batch Mode" to process multiple PDFs in a directory (labels will update automatically).
2. **File Selection**: Click "Browse" next to "Input" to select your PDF file or directory.
3. **Output Location**: Click "Browse" next to "Output" to choose where to save the decrypted file(s).
4. **Password**: Enter a password if your PDF(s) are encrypted (leave blank if not encrypted).
5. **Process**: Click "Remove Encryption" to start processing.
6. **Monitor Progress**: Watch the progress bar and status updates during processing.
7. A success message will appear when processing is complete.
## 🛠️ Troubleshooting
- **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.
## 📝 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Disclaimer
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.