A simple Python script to compress scanned PDF files by converting each page to a low-resolution JPEG image and rebuilding the PDF. Useful for reducing file sizes of scanned documents (e.g., CamScanner exports) to meet upload or email size limits.
- Converts each page to JPEG with configurable DPI and quality.
- Suitable for scanned/image-based PDFs.
- Simple and fast – works locally without sending data to external servers.
Install dependencies:
pip install -r requirements.txt