Skip to content

MingyuKim87/Compress_PDFs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

PDF Compression for ML Conference Submissions

This repository provides a Python-based solution to compress PDF files to meet the file size requirements of top-tier ML conferences. These venues often require that the size of the submitted papers does not exceed 10MB. This script uses Ghostscript to compress PDF files efficiently.

Features

  • Compress individual PDF files.
  • Compress all PDF files in a specified directory.
  • Replace original files with compressed versions automatically.

Requirements

  • Python 3.x
  • Ghostscript

Installation

  1. Clone the repository:

    git clone https://github.com/MingyuKim87/pdf-compression.git
    cd pdf-compression
  2. Install Ghostscript:

    • Ubuntu/Debian:

      sudo apt-get install ghostscript
    • macOS (using Homebrew):

      brew install ghostscript
    • Windows: Download and install Ghostscript from here.

Usage

Compress a Single PDF File

To compress a single PDF file, you can use the compress_pdf function directly. Example:

from pdf_compression import compress_pdf

input_file_path = 'path/to/your/input.pdf'
output_file_path = 'path/to/your/output.pdf'
compress_pdf(input_file_path, output_file_path)

About

Python Implementation of Compressing PDFs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages