Skip to content

KJSDC/pdf-splitter-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Splitter & Compressor

This tool lets you preview, split, and compress PDF files with a simple GUI.

Quick Start

  1. Install dependencies:

    pip install -r requirements.txt
  2. Run the app:

    python pdf_splitter_gui.py

Requirements

  • PyPDF2==3.0.1
  • pdf2image==1.16.3
  • Pillow==10.3.0

Windows Setup

Windows users can run the provided batch script to automatically install Python, Poppler, Ghostscript, and all required Python packages:

install-dependencies.bat

This will:

  • Download and install Python (if missing)
  • Download and install Ghostscript (if missing)
  • Download and extract Poppler (if missing)
  • Add Poppler to the PATH for the session
  • Create a Python virtual environment and install all required packages

If you prefer manual setup:

Poppler (for pdf2image)

Ghostscript (for compression)

Note: The script calls gswin64c. Ensure this executable is available in your PATH or bundled with your app.

Bundling for Distribution

If you want a portable Windows executable:

  • Bundle Poppler and Ghostscript folders with your app.
  • Use PyInstaller:
    pyinstaller --onefile --windowed --add-data "ghostscript;ghostscript" --add-data "poppler;poppler" pdf_splitter_gui.py
  • Update the script to use bundled paths for Poppler and Ghostscript.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published