Complete offline PDF toolkit with merge and compression capabilities.
Files: index.html, styles.css, app.js
- ✅ Merge multiple PDFs
- ✅ Basic compression (structural optimization)
- ✅ Works in browser
⚠️ Limited compression (5-20% reduction)
- Open
index.htmlin any browser - Use Merge or Compress tabs
File: compress_pdf.py
- ✅ Real compression - Compresses images within PDFs
- ✅ Target size - Reduces to specific KB size
- ✅ Automatic quality adjustment - Tries different compression levels
- ✅ Offline - No internet required
- ✅ 50-90% reduction possible on image-heavy PDFs
- Install Python (if not installed): https://www.python.org/
- Run installer:
OR manually:
Double-click: install.batpip install -r requirements.txt
# Maximum compression
python compress_pdf.py document.pdf
# Compress to specific size (500 KB)
python compress_pdf.py document.pdf 500- Drag PDF file onto
compress.bat - Enter target size when prompted (or press Enter for max compression)
compress.bat document.pdf 500# Compress presentation.pdf to maximum
python compress_pdf.py presentation.pdf
# Compress report.pdf to exactly/below 1000 KB (1 MB)
python compress_pdf.py report.pdf 1000
# Compress images.pdf to 200 KB
python compress_pdf.py images.pdf 200- Original:
document.pdf - Compressed:
document_compressed.pdf
| Feature | Web Interface | Python Compressor |
|---|---|---|
| Offline | ✅ Yes | ✅ Yes |
| Installation | None | Python + packages |
| Merge PDFs | ✅ Yes | ❌ No (use web) |
| Image Compression | ❌ No | ✅ Yes |
| Target Size | ✅ Accurate | |
| Typical Reduction | 5-20% | 50-90% |
- Merging PDFs → Use Web Interface
- Light compression → Use Web Interface
- Heavy compression → Use Python Compressor
- Target specific size → Use Python Compressor
- Image-heavy PDFs → Use Python Compressor
pdf_merger_offline/
├── index.html # Web interface
├── styles.css # Web styling
├── app.js # Web logic
├── compress_pdf.py # Python compressor (POWERFUL)
├── requirements.txt # Python dependencies
├── install.bat # Auto-installer
├── compress.bat # Drag-drop helper
└── README.md # This file
- For Merging: Open
index.html - For Compression:
- Install:
install.bat - Use:
python compress_pdf.py yourfile.pdf 500
- Install:
"Python not found"
- Install Python from https://www.python.org/
- Check "Add to PATH" during installation
"Module not found"
- Run
install.batagain - Or:
pip install -r requirements.txt
"Cannot compress to target size"
- PDF may have non-compressible content
- Try lower quality (script auto-adjusts)
- Some PDFs have minimum sizes
- Start with target size slightly higher than needed
- Image-heavy PDFs compress better
- Text-only PDFs have limited compression
- Lower quality = smaller size (quality: 10-100)
Made with ❤️ for offline PDF processing