Skip to content

chelberserker/compdf

Repository files navigation

PDF MultiTool for Ubuntu

A simple, standalone Python application to compress/merge/split/convert PDF files on Ubuntu using the powerful Ghostscript engine.

PDF Compressor

Features

  • High-Quality Compression: Leverages ghostscript for 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.

Prerequisites

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 --version

If missing, install it via:

sudo apt update && sudo apt install ghostscript

How to Run

Option 1: Standalone Executable (Recommended)

If you have the binary provided in the dist/ folder:

  1. Navigate to the folder containing PDFCompressor.
  2. Run:
    ./PDFCompressor

Option 2: Run from Source

  1. Clone/Download this repository.
  2. Set up Python Environment (Ubuntu 24.04+ requires a venv):
    python3 -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  3. Run the App:
    python main.py

Installation

To install the app with a desktop icon:

./install.sh

Building from Source

To create the standalone executable yourself:

  1. Activate your virtual environment.
  2. Install dependencies including pyinstaller:
    pip install -r requirements.txt pyinstaller
  3. Run the build script:
    ./build_app.sh
  4. The output file will be in dist/PDFCompressor.

License

MIT License.

About

Simple wrapper app to compress large PDF files using Ghostscript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors