A simple, standalone Python application to compress/merge/split/convert PDF files on Ubuntu using the powerful Ghostscript engine.
- High-Quality Compression: Leverages
ghostscriptfor professional-grade PDF resizing. - 4 Compression Levels:
- Screen: Low quality, smallest size (72 dpi).
- Ebook: Medium quality, balanced (150 dpi).
- Printer: High quality, print ready (300 dpi).
- Prepress: Best quality, color handling preserved (300 dpi).
- Filesize Previews: See original and compressed file sizes instantly.
- Merge: Combine multiple PDFs into one.
- Split: Extract specific pages (e.g. "1-5, 10").
- Convert: Save PDF pages as PNG or JPEG images.
- Standalone Executable: Runs without installing Python libraries (once built).
- Dark Mode: Automatically adapts to your system theme.
This application relies on Ghostscript to perform the actual compression. It is installed by default on most Ubuntu systems. To verify you have it:
gs --versionIf missing, install it via:
sudo apt update && sudo apt install ghostscriptIf you have the binary provided in the dist/ folder:
- Navigate to the folder containing
PDFCompressor. - Run:
./PDFCompressor
- Clone/Download this repository.
- Set up Python Environment (Ubuntu 24.04+ requires a venv):
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt - Run the App:
python main.py
To install the app with a desktop icon:
./install.shTo create the standalone executable yourself:
- Activate your virtual environment.
- Install dependencies including
pyinstaller:pip install -r requirements.txt pyinstaller
- Run the build script:
./build_app.sh
- The output file will be in
dist/PDFCompressor.
MIT License.
