Intelligent Document Processing & Analysis Suite
A powerful, AI-driven PDF processing tool that automatically analyzes PDFs using Google Gemini AI and splits them into organized sections with a modern, professional GUI interface.
- ๐ Smart File Handling: Accepts PDFs up to 400MB with automatic compression
- ๐ค AI-Powered Analysis: Uses Google Gemini AI to intelligently identify document sections
- โ๏ธ Automated Splitting: Organizes pages into structured folders with consistent naming
- ๐ Live Progress Tracking: Real-time processing updates with percentage display
- ๐ป Terminal Interface: Live processing output with timestamps
- ๐ฅ๏ธ Fixed Medium Window: 900x700 non-resizable professional layout
- ๐ Split Layout: File selector at top, terminal + results at bottom
- ๐ญ Cyber Tech Theme: Dark theme with cyan/green accents
- ๐ฑ Responsive Design: Clean, organized interface with modern styling
- ๐ Smart Controls: Automatic button state management during processing
- ๐ Master Folders: Uses full PDF name as prefix (e.g., "WF_4262_The Paris Library")
- ๐ Sub Folders: Organized by sections with consistent naming
- ๐ Individual Files: Section-relative page numbering with full prefix
- ๐ท๏ธ Safe Naming: Automatic sanitization of invalid characters
- Python 3.8+ (3.12 recommended)
- Operating System: Windows 10+ or Linux (Ubuntu 20.04+)
- Memory: 4GB RAM minimum, 8GB recommended
- Storage: 2GB free space for processing large files
- Internet: Required for Google Gemini AI API access
PyMuPDF (fitz)- PDF manipulation and compressiongoogle-generativeai- Google Gemini AI integrationpython-dotenv- Environment variable managementPillow (PIL)- Image processing for PDF compressiontkinter- GUI framework (usually included with Python)
# Clone or download the project
git clone <repository-url>
cd AI-PDF-SPLITTERS
# Run the automatic setup script
./launch.sh # Linux/macOS
launch.bat # WindowsThe launch script will automatically:
- Create a Python virtual environment
- Install all required dependencies
- Generate a
.envconfiguration file - Prompt you to add your Google Gemini API key
- Visit Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy the generated key
- Paste it into the
.envfile when prompted
After setup, simply run:
./launch.sh # Linux/macOS
launch.bat # Windows- Click "๐ BROWSE" to select your PDF file
- Files up to 400MB are supported
- File information will display automatically
- Click "โก PROCESS" to begin analysis
- Watch live progress in the terminal panel
- Processing includes:
- File validation and compression (if needed)
- AI analysis with Google Gemini
- Intelligent section identification
- Automated page splitting
- View detailed results in the terminal
- Click "๐ OPEN OUTPUT" to access organized files
- Use "๐๏ธ CLEAR" to reset for new processing
๐ WF_4262_The Paris Library/
โโโ ๐ WF_4262_The Paris Library_Front Cover/
โ โโโ ๐ WF_4262_The Paris Library_Front Cover_Page_1.pdf
โโโ ๐ WF_4262_The Paris Library_Chapter 1_Odile/
โ โโโ ๐ WF_4262_The Paris Library_Chapter 1_Odile_Page_1.pdf
โ โโโ ๐ WF_4262_The Paris Library_Chapter 1_Odile_Page_2.pdf
โ โโโ ๐ WF_4262_The Paris Library_Chapter 1_Odile_Page_3.pdf
โโโ ๐ WF_4262_The Paris Library_Chapter 2_Lily/
โ โโโ ๐ WF_4262_The Paris Library_Chapter 2_Lily_Page_1.pdf
โ โโโ ๐ WF_4262_The Paris Library_Chapter 2_Lily_Page_2.pdf
โโโ ๐ splitting_summary.txt
# Google Gemini AI Configuration
GEMINI_API_KEY=your_api_key_here
GEMINI_TEMPERATURE=0.1
GEMINI_MAX_TOKENS=8192- Maximum File Size: 400MB input limit
- Compression Target: ~50MB for AI analysis
- AI Model: Google Gemini Pro
- Output Format: Individual PDF pages
- Naming Convention: Consistent prefix-based system
If you prefer manual setup:
# Create virtual environment
python3 -m venv venv
# Activate environment
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Create .env file
cp .env.example .env
# Edit .env with your API key
# Launch GUI
python ai_pdf_splitter_gui.pyEach component can be used independently:
# Step 1: Compress PDF
python pdf_compressor.py input.pdf
# Step 2: AI Analysis
python ai_processor.py input_compressed.pdf
# Step 3: Split PDF
python pdf_splitter.py input.pdf analysis.json output_directory1. "ModuleNotFoundError" during startup
# Ensure virtual environment is activated
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
# Reinstall dependencies
pip install -r requirements.txt2. "API key not found" error
# Check .env file exists and contains valid key
cat .env # Linux/macOS
type .env # Windows
# Verify API key format (should start with 'AI')3. "File too large" error
- Maximum input size is 400MB
- For larger files, use external PDF compression first
- Consider splitting large documents manually
4. GUI doesn't start
# Check Python version (3.8+ required)
python --version
# Verify tkinter installation
python -c "import tkinter"
# Try launching manually
python ai_pdf_splitter_gui.py- Large Files: Files over 100MB may take longer to process
- Internet Speed: AI analysis requires stable internet connection
- Memory Usage: Close other applications for large file processing
- Storage Space: Ensure 2x file size available for temporary files
- Local Processing: PDF compression and splitting happen locally
- AI Analysis: Only PDF content is sent to Google Gemini (secure HTTPS)
- No Data Storage: No files are permanently stored by Google
- API Key Security: Store your API key securely in
.envfile
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Review the terminal output for error messages
- Ensure your API key is valid and has sufficient quota
- Verify your internet connection for AI analysis
- Batch processing for multiple PDFs
- Custom AI prompts for specialized document types
- OCR integration for scanned documents
- Cloud storage integration
- Advanced filtering and search capabilities
Built with โค๏ธ by @TechyCSR
๐ Portfolio: techycsr.me
๐ผ Professional: AI/ML Developer & Software Engineer
๐ Passion: Creating intelligent solutions for document processing
This AI PDF Splitter Pro represents the intersection of artificial intelligence and practical document management. Built using cutting-edge AI technology from Google Gemini, it demonstrates how modern AI can solve real-world productivity challenges.
Key Technologies:
- ๐ค Google Gemini AI - Advanced document analysis
- ๐ Python 3.8+ - Core development platform
- ๐ฅ๏ธ Tkinter - Modern GUI framework
- ๐ PyMuPDF - PDF processing engine
- ๐จ Modern UI/UX - Professional interface design
ยฉ 2024 TechyCSR. All rights reserved. Made with โค๏ธ for intelligent document processing.