How chaitanyabiswas/pdf-splitter works
PDF Splitter is a small Python library with a CLI for dividing PDFs into page-count chunks, optionally skipping initial pages. The main workflow validates and reads the source PDF, calculates original-page ranges, resolves output filenames and collisions, then writes chunks while preserving metadata where supported. The README documents both CLI and Python API entry points; the source excerpts show the CLI call path and the splitter’s utility calls. External PDF-library interactions are visible in the splitter excerpt.
Main entry points: splitter.py Split and validate · cli.py Command-line interface · utils.py Filename and path handling
Components 8
Entry points
- Command-line interface
pdf_splitter/cli.py
PDF processing
- Split and validate
pdf_splitter/splitter.py - pypdf reader/writer
File handling
- Filename and path handling
pdf_splitter/utils.py - Source PDF
- Chunk PDFs
Other components
- CLI user
- Python caller
Connections 7
- CLI user → Command-line interface: runs
README.md - Python caller → Split and validate: calls API
README.md - Command-line interface → Split and validate: calls
pdf_splitter/cli.py - Split and validate → pypdf reader/writer: reads and writes
pdf_splitter/splitter.py - Split and validate → Filename and path handling: resolves paths
pdf_splitter/splitter.py - Split and validate → Source PDF: reads
pdf_splitter/splitter.py - Split and validate → Chunk PDFs: writes chunks
pdf_splitter/splitter.py