Skip to content

JACK-bopp/pdf-splitter

Repository files navigation

PDF Splitter

Batch splitting and preview built for large PDFs

Python License Platform


Preview

PDF Splitter UI preview


Why this tool

  • Batch-first workflow: upload multiple PDFs and split them in one run
  • Built for large files: optimized paths and fallback recovery for tough inputs
  • Clear visibility: live progress, preview, and metadata for confidence
  • One-click export: zip packaging for fast download

Features

Split modes

  • By pages
  • By size
  • By range
  • By chapters (auto-detect or custom)

Reliability

  • Large-file mode with memory monitoring
  • Automatic fallback splitting on errors
  • Optional integrity checks and analysis

Workflow helpers

  • Output folder picker
  • Live progress with speed and ETA
  • Preview and metadata panel

Quick Start

Install

# Clone
git clone https://github.com/JACK-bopp/pdf-splitter.git
cd pdf-splitter

# Install dependencies
pip install -r requirements.txt

# Start the web app
python pdf_web_app.py

Open in Browser

Default: http://127.0.0.1:5000

Custom port:

PDF_SPLITTER_PORT=5001 python pdf_web_app.py

Usage

  1. Upload PDFs (click or drag)
  2. Choose split mode
  3. Start processing
  4. Download results

Parameter Examples

  • Pages per file: 10
  • Target size: 5 (MB)
  • Range: 1-10,15-25
  • Chapter: auto-detect or custom list

Performance metrics

  • Duration per run
  • Peak memory usage
  • Failure rate across runs

FAQ

  • Preview not available: ensure PyMuPDF is installed (see requirements.txt)
  • Invalid output path: the app will try to create the folder, check permissions
  • Cancel behavior: stops quickly but may keep already generated files
  • Port 5000 in use: set PDF_SPLITTER_PORT=5001 or disable AirPlay Receiver on macOS

Requirements

  • Python: 3.7+
  • OS: Windows / macOS / Linux
  • Memory: 2GB minimum, 8GB recommended
  • Browser: Chrome, Firefox, Safari, Edge
  • Optional: PyMuPDF for preview

Project Structure

pdf-splitter/
|-- pdf_web_app.py          # Web app server
|-- pdf_processor.py        # Core processing engine
|-- pdf_chapter_splitter.py # Chapter detection
|-- templates/
|   `-- index.html          # Frontend UI
`-- requirements.txt        # Dependencies

Contributing

  1. Fork this repo
  2. Create a feature branch
  3. Commit your changes
  4. Open a Pull Request

Issues and feature requests are welcome: https://github.com/JACK-bopp/pdf-splitter/issues


Acknowledgements

Thanks to everyone who contributes code, feedback, and bug reports. If this project helps you, please consider giving it a Star.

GitHub stars


Contact

Email: 15623870239@163.com
Phone: 15623870239
GitHub: @JACK-bopp


License

Licensed under the MIT License - see LICENSE.

About

PDF-splitter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published