# ๐๏ธ PDF Zipper
<div align="center">
[](https://badge.fury.io/py/pdf-zipper)




</div>
A powerful file processing tool supporting PDF compression, format conversion (PDF โ PPTX), with both GUI and CLI interfaces, built with modern Python.
## ๐ธ Screenshots
<div align="center">
<table>
<tr>
<td width="50%">
### ๐ฅ๏ธ Beautiful Terminal GUI

*Interactive file browser with drag & drop support*
</td>
<td width="50%">
### โจ๏ธ Powerful Command Line Interface

*Rich output with progress indicators and detailed info*
</td>
</tr>
</table>
</div>
## โจ Features
- **๐ฏ Auto Compression**: Automatically compress PDFs and PPTX files to a target file size
- **๐ง Manual Compression**: Compress PDFs with custom DPI settings
- **๐ Bi-directional Conversion**: Convert between PDF and PowerPoint formats (PDF โ PPTX)
- **๐ Multi-format Support**: Process both PDF (.pdf) and PowerPoint (.pptx) files
- **๐ฅ๏ธ Beautiful GUI**: Modern terminal-based interface using Textual
- **โจ๏ธ CLI Interface**: Full command-line support with rich output
- **๐ Drag & Drop Support**: Easy file selection in GUI mode
- **๐ Format Detection**: Automatic file type detection and validation
- **๐ฆ Easy Installation**: Install as a system command
## ๐ Installation
### From PyPI (Recommended)
```bash
pip install pdf-zipper
```
### From Source
```bash
git clone https://github.com/your-username/pdf-zipper.git
cd pdf-zipper
pip install -e .
```
### Standalone Executable (No Python Required)
<pre align="center">
๐งช Working in Progress
</pre>
Download the pre-built executable for your platform:
**macOS (Apple Silicon)**
```bash
# Option 1: App Bundle (Recommended for GUI users)
# Download PDF-Zipper-darwin-arm64.app from releases page
# Double-click to launch GUI interface
# Option 2: Command Line Executable
# Download from releases page
chmod +x pdf-zipper-gui-darwin-arm64
./pdf-zipper-gui-darwin-arm64 --help
./pdf-zipper-gui-darwin-arm64 gui # Launch GUI
```
**Windows**
```cmd
REM Download from releases page
pdf-zipper-cli-windows-x64.exe --help
```
**Linux**
```bash
# Download from releases page
chmod +x pdf-zipper-cli-linux-x64
./pdf-zipper-cli-linux-x64 --help
```
### From Source
```bash
git clone https://github.com/your-username/pdf-zipper.git
cd pdf-zipper
pip install -e .
```
### Using Installation Script
```bash
git clone https://github.com/your-username/pdf-zipper.git
cd pdf-zipper
./install.sh
```
## ๐ Usage
### CLI Commands
After installation, you can use `pdf-zipper` or `pdfzip` commands:
```bash
# Launch GUI
pdf-zipper gui
# Compress PDF to specific size (auto mode)
pdf-zipper compress input.pdf --target-size 5.0
# Compress PDF with specific DPI (manual mode)
pdf-zipper compress input.pdf --dpi 150
# Convert PPTX to PDF (new feature!)
pdf-zipper compress presentation.pptx
# Convert PDF to PowerPoint
pdf-zipper convert input.pdf
# Convert PowerPoint to PDF (new feature!)
pdf-zipper convert presentation.pptx
# Show file information (supports PDF and PPTX)
pdf-zipper info input.pdf
pdf-zipper info presentation.pptx
# Show help
pdf-zipper --help
```
The CLI provides rich, colorful output with progress indicators and detailed information (see CLI screenshot above).
### GUI Mode
```bash
pdf-zipper gui
```
The GUI provides an intuitive interface with file browser, drag & drop support, and real-time progress logging (see screenshot above).
### Programmatic Usage
```python
from pdf_zipper import autocompress, autocompress_pdf, autocompress_pptx, autocompress_pdf_to_pptx, compress_pdf, convert_to_ppt
# Universal auto compression (supports format conversion)
autocompress("input.pdf", "output.pdf", 5.0, print) # PDF โ PDF
autocompress("input.pptx", "output.pptx", 5.0, print) # PPTX โ PPTX
autocompress("input.pdf", "output.pptx", 5.0, print) # PDF โ PPTX (NEW!)
# Specific auto compression functions
autocompress_pdf("input.pdf", "output.pdf", 5.0, print) # PDF โ PDF
autocompress_pptx("input.pptx", "output.pptx", 5.0, print) # PPTX โ PPTX
autocompress_pdf_to_pptx("input.pdf", "output.pptx", 5.0, print) # PDF โ PPTX (NEW!)
# Manual compression and conversion
compress_pdf("input.pdf", "output.pdf", 150, print) # Manual PDF compression
convert_to_ppt("input.pdf", "output.pptx", 150, print) # PDF โ PPTX conversion
```
## ๐ ๏ธ Development
### Setup Development Environment
```bash
git clone https://github.com/your-username/pdf-zipper.git
cd pdf-zipper
pip install -e ".[dev]"
```
### Run Tests
```bash
pytest
```
### Code Formatting
```bash
black src/
isort src/
```
## ๐ Requirements
- Python 3.8+
- PyMuPDF (fitz)
- Pillow
- python-pptx
- rich
- textual
- typer
## ๐ง How It Works
1. **Auto Compression**:
- **PDF โ PDF**: Uses binary search to find the optimal DPI that achieves the target file size
- **PPTX โ PPTX**: Converts PPTX โ PDF โ optimizes DPI โ converts back to PPTX
- **PDF โ PPTX**: Optimizes PDF DPI โ converts to PowerPoint format (NEW!)
2. **Manual Compression**: Converts PDF pages to images at specified DPI and recreates the PDF
3. **Format Conversion**:
- **PDF to PPT**: Extracts each page as an image and creates PowerPoint slides
- **PPTX to PDF**: Uses system tools (LibreOffice, unoconv) or Windows COM interface
## ๐ก Tips
- Higher DPI = better quality but larger file size
- Auto compression may take longer but provides precise size control
- For best results, start with the auto compression feature
- **Format Conversion Options**:
- **PDF โ PDF**: Direct optimization for fastest processing
- **PPTX โ PPTX**: Maintains PowerPoint format while achieving target size
- **PDF โ PPTX**: Convert and optimize in one step (NEW!)
- Use the GUI for interactive file selection and real-time progress
- Use CLI for batch processing and automation
## ๐ License
MIT License - see [LICENSE](LICENSE) file for details.
## ๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Raw data
{
"_id": null,
"home_page": null,
"name": "pdf-zipper",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "cli, compression, conversion, gui, pdf, powerpoint, pptx, textual",
"author": null,
"author_email": "PDF Zipper Team <team@pdfzipper.com>",
"download_url": "https://files.pythonhosted.org/packages/fd/51/c74479f3fd9a768d3218d861b19ae2301738341b08e726102b721faee239/pdf_zipper-1.2.2.tar.gz",
"platform": null,
"description": "# \ud83d\udddc\ufe0f PDF Zipper\n\n<div align=\"center\">\n\n[](https://badge.fury.io/py/pdf-zipper)\n\n\n\n\n\n</div>\n\nA powerful file processing tool supporting PDF compression, format conversion (PDF \u2194 PPTX), with both GUI and CLI interfaces, built with modern Python.\n\n## \ud83d\udcf8 Screenshots\n\n<div align=\"center\">\n<table>\n<tr>\n<td width=\"50%\">\n\n### \ud83d\udda5\ufe0f Beautiful Terminal GUI\n\n*Interactive file browser with drag & drop support*\n\n</td>\n<td width=\"50%\">\n\n### \u2328\ufe0f Powerful Command Line Interface\n\n*Rich output with progress indicators and detailed info*\n\n</td>\n</tr>\n</table>\n</div>\n\n## \u2728 Features\n\n- **\ud83c\udfaf Auto Compression**: Automatically compress PDFs and PPTX files to a target file size\n- **\ud83d\udd27 Manual Compression**: Compress PDFs with custom DPI settings\n- **\ud83d\udcca Bi-directional Conversion**: Convert between PDF and PowerPoint formats (PDF \u2194 PPTX)\n- **\ud83d\udcc1 Multi-format Support**: Process both PDF (.pdf) and PowerPoint (.pptx) files\n- **\ud83d\udda5\ufe0f Beautiful GUI**: Modern terminal-based interface using Textual\n- **\u2328\ufe0f CLI Interface**: Full command-line support with rich output\n- **\ud83d\udcc1 Drag & Drop Support**: Easy file selection in GUI mode\n- **\ud83d\udd04 Format Detection**: Automatic file type detection and validation\n- **\ud83d\udce6 Easy Installation**: Install as a system command\n\n## \ud83d\ude80 Installation\n\n### From PyPI (Recommended)\n```bash\npip install pdf-zipper\n```\n\n### From Source\n```bash\ngit clone https://github.com/your-username/pdf-zipper.git\ncd pdf-zipper\npip install -e .\n```\n\n### Standalone Executable (No Python Required)\n\n<pre align=\"center\">\n\ud83e\uddea Working in Progress\n</pre>\n\nDownload the pre-built executable for your platform:\n\n**macOS (Apple Silicon)**\n```bash\n# Option 1: App Bundle (Recommended for GUI users)\n# Download PDF-Zipper-darwin-arm64.app from releases page\n# Double-click to launch GUI interface\n\n# Option 2: Command Line Executable\n# Download from releases page\nchmod +x pdf-zipper-gui-darwin-arm64\n./pdf-zipper-gui-darwin-arm64 --help\n./pdf-zipper-gui-darwin-arm64 gui # Launch GUI\n```\n\n**Windows**\n```cmd\nREM Download from releases page\npdf-zipper-cli-windows-x64.exe --help\n```\n\n**Linux**\n```bash\n# Download from releases page\nchmod +x pdf-zipper-cli-linux-x64\n./pdf-zipper-cli-linux-x64 --help\n```\n\n### From Source\n```bash\ngit clone https://github.com/your-username/pdf-zipper.git\ncd pdf-zipper\npip install -e .\n```\n\n### Using Installation Script\n```bash\ngit clone https://github.com/your-username/pdf-zipper.git\ncd pdf-zipper\n./install.sh\n```\n\n## \ud83d\udcd6 Usage\n\n### CLI Commands\n\nAfter installation, you can use `pdf-zipper` or `pdfzip` commands:\n\n```bash\n# Launch GUI\npdf-zipper gui\n\n# Compress PDF to specific size (auto mode)\npdf-zipper compress input.pdf --target-size 5.0\n\n# Compress PDF with specific DPI (manual mode)\npdf-zipper compress input.pdf --dpi 150\n\n# Convert PPTX to PDF (new feature!)\npdf-zipper compress presentation.pptx\n\n# Convert PDF to PowerPoint\npdf-zipper convert input.pdf\n\n# Convert PowerPoint to PDF (new feature!)\npdf-zipper convert presentation.pptx\n\n# Show file information (supports PDF and PPTX)\npdf-zipper info input.pdf\npdf-zipper info presentation.pptx\n\n# Show help\npdf-zipper --help\n```\n\nThe CLI provides rich, colorful output with progress indicators and detailed information (see CLI screenshot above).\n\n### GUI Mode\n```bash\npdf-zipper gui\n```\n\nThe GUI provides an intuitive interface with file browser, drag & drop support, and real-time progress logging (see screenshot above).\n\n### Programmatic Usage\n```python\nfrom pdf_zipper import autocompress, autocompress_pdf, autocompress_pptx, autocompress_pdf_to_pptx, compress_pdf, convert_to_ppt\n\n# Universal auto compression (supports format conversion)\nautocompress(\"input.pdf\", \"output.pdf\", 5.0, print) # PDF \u2192 PDF\nautocompress(\"input.pptx\", \"output.pptx\", 5.0, print) # PPTX \u2192 PPTX\nautocompress(\"input.pdf\", \"output.pptx\", 5.0, print) # PDF \u2192 PPTX (NEW!)\n\n# Specific auto compression functions\nautocompress_pdf(\"input.pdf\", \"output.pdf\", 5.0, print) # PDF \u2192 PDF\nautocompress_pptx(\"input.pptx\", \"output.pptx\", 5.0, print) # PPTX \u2192 PPTX\nautocompress_pdf_to_pptx(\"input.pdf\", \"output.pptx\", 5.0, print) # PDF \u2192 PPTX (NEW!)\n\n# Manual compression and conversion\ncompress_pdf(\"input.pdf\", \"output.pdf\", 150, print) # Manual PDF compression\nconvert_to_ppt(\"input.pdf\", \"output.pptx\", 150, print) # PDF \u2192 PPTX conversion\n```\n\n## \ud83d\udee0\ufe0f Development\n\n### Setup Development Environment\n```bash\ngit clone https://github.com/your-username/pdf-zipper.git\ncd pdf-zipper\npip install -e \".[dev]\"\n```\n\n### Run Tests\n```bash\npytest\n```\n\n### Code Formatting\n```bash\nblack src/\nisort src/\n```\n\n## \ud83d\udccb Requirements\n\n- Python 3.8+\n- PyMuPDF (fitz)\n- Pillow\n- python-pptx\n- rich\n- textual\n- typer\n\n## \ud83d\udd27 How It Works\n\n1. **Auto Compression**:\n - **PDF \u2192 PDF**: Uses binary search to find the optimal DPI that achieves the target file size\n - **PPTX \u2192 PPTX**: Converts PPTX \u2192 PDF \u2192 optimizes DPI \u2192 converts back to PPTX\n - **PDF \u2192 PPTX**: Optimizes PDF DPI \u2192 converts to PowerPoint format (NEW!)\n2. **Manual Compression**: Converts PDF pages to images at specified DPI and recreates the PDF\n3. **Format Conversion**:\n - **PDF to PPT**: Extracts each page as an image and creates PowerPoint slides\n - **PPTX to PDF**: Uses system tools (LibreOffice, unoconv) or Windows COM interface\n\n## \ud83d\udca1 Tips\n\n- Higher DPI = better quality but larger file size\n- Auto compression may take longer but provides precise size control\n- For best results, start with the auto compression feature\n- **Format Conversion Options**:\n - **PDF \u2192 PDF**: Direct optimization for fastest processing\n - **PPTX \u2192 PPTX**: Maintains PowerPoint format while achieving target size\n - **PDF \u2192 PPTX**: Convert and optimize in one step (NEW!)\n- Use the GUI for interactive file selection and real-time progress\n- Use CLI for batch processing and automation\n\n## \ud83d\udcc4 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n",
"bugtrack_url": null,
"license": null,
"summary": "A powerful file processing tool supporting PDF compression and PDF/PPTX conversion with GUI and CLI interfaces",
"version": "1.2.2",
"project_urls": {
"Homepage": "https://github.com/wibus-wee/pdf-zipper",
"Issues": "https://github.com/wibus-wee/pdf-zipper/issues",
"Repository": "https://github.com/wibus-wee/pdf-zipper"
},
"split_keywords": [
"cli",
" compression",
" conversion",
" gui",
" pdf",
" powerpoint",
" pptx",
" textual"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "453c84323195d9694961d282011d3ccbf26b03cf8888485ffe6003aec4537b87",
"md5": "a77ec173b7ea53a02043230d8a73783c",
"sha256": "23bfc50f28b617c4c3180fc0d4947a21c139f5d0a5872a096453cf912c2cb06c"
},
"downloads": -1,
"filename": "pdf_zipper-1.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a77ec173b7ea53a02043230d8a73783c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 20907,
"upload_time": "2025-07-11T16:50:21",
"upload_time_iso_8601": "2025-07-11T16:50:21.674210Z",
"url": "https://files.pythonhosted.org/packages/45/3c/84323195d9694961d282011d3ccbf26b03cf8888485ffe6003aec4537b87/pdf_zipper-1.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fd51c74479f3fd9a768d3218d861b19ae2301738341b08e726102b721faee239",
"md5": "2eec485a6b7c01bcd5e5f5471c6834e8",
"sha256": "55693bebc386b421959d11ddf58ebbbeae1ba921699f13ab3d5f82d85275071f"
},
"downloads": -1,
"filename": "pdf_zipper-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "2eec485a6b7c01bcd5e5f5471c6834e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 20014,
"upload_time": "2025-07-11T16:50:22",
"upload_time_iso_8601": "2025-07-11T16:50:22.928368Z",
"url": "https://files.pythonhosted.org/packages/fd/51/c74479f3fd9a768d3218d861b19ae2301738341b08e726102b721faee239/pdf_zipper-1.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 16:50:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wibus-wee",
"github_project": "pdf-zipper",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "PyMuPDF",
"specs": []
},
{
"name": "Pillow",
"specs": []
},
{
"name": "python-pptx",
"specs": []
},
{
"name": "rich",
"specs": []
},
{
"name": "questionary",
"specs": []
},
{
"name": "textual",
"specs": []
}
],
"lcname": "pdf-zipper"
}