Author: Pinaka Type: CLI + Minimal GUI Tool Domain: Document Automation Level: Intermediate
PDF Merger CLI is a powerful command-line based PDF utility that allows users to:
- Merge multiple PDF files
- Slice (extract specific page ranges)
- Save output using a file-save dialog
Although primarily a CLI application, it smartly uses GUI file dialogs for file selection to improve user experience.
This project reflects how real desktop utilities are designed — CLI logic with GUI assistance.
Project_36/
├── main.py
└── README.md
No database No config files Pure local execution
- 📎 Merge multiple PDF files
- ✂ Slice (extract) specific page ranges
- 📂 GUI-based file picker (no typing paths)
- 💾 GUI save dialog for output file
- 📊 Shows total page count
- 🧠 Memory-efficient processing
- 🖥️ Clean terminal UI with Rich
Create requirements.txt
rich
pypdf
tkintercomes pre-installed with Python (Windows/macOS/Linux)
Install dependencies:
pip install -r requirements.txtpython main.py| Option | Action |
|---|---|
1 |
Merge PDFs |
2 |
Slice (Cut Pages) |
h |
Help |
Q |
Exit |
- Select a PDF file
- Choose whether to slice pages or keep full document
- Repeat for multiple PDFs
- Save merged output
✔ Pages are appended in selected order
- Select a PDF file
- View total page count
- Enter start & end page
- Save sliced PDF
📌 Useful for extracting chapters, assignments, notes, etc.
Select PDF
↓
Read page count
↓
Slice or full copy
↓
Append to writer
↓
Save output
- Works only with PDF files
- No password-protected PDF support
- No preview (CLI-focused)
- GUI dialogs may not work on headless servers
- PDF file manipulation
- Mixing CLI + GUI design
- Memory-efficient document processing
- Page-level data handling
- Real-world automation mindset