A full-stack Jupyter Notebook to PDF Converter web application with a professional UI and robust backend.
- app.py - Flask backend with conversion API
- templates/index.html - Modern web interface
- requirements.txt - Python dependencies
- README.md - Full documentation
- SETUP.md - Quick start guide
- .env.example - Environment variables template
- .gitignore - Git ignore patterns
- sample_notebook.ipynb - Test notebook file
✅ Backend (Flask)
- RESTful API for file conversion
- IPYNB to PDF conversion using nbconvert
- File validation and security
- Error handling and logging
- CORS support for frontend requests
- Health check endpoint
✅ Frontend (HTML/CSS/JavaScript)
- Responsive, modern UI with gradient design
- Drag-and-drop file upload
- Real-time progress tracking
- File validation before upload
- Success/error message handling
- Mobile-friendly interface
✅ Security
- File type validation (only .ipynb)
- File size limits (50MB max)
- Secure filename handling
- Temporary file cleanup
| Component | Technology |
|---|---|
| Backend | Flask 2.3.3 |
| Conversion | nbconvert 7.10.0 |
| Frontend | HTML5, CSS3, Vanilla JS |
| Document Generation | Pandoc |
| CORS | Flask-CORS |
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
sudo apt-get install pandoc # For PDF generationpython app.pyOpen http://localhost:5000 in your browser
- Use the drag-and-drop area to upload a .ipynb file
- Click "Convert to PDF"
- The PDF downloads automatically
| Method | Endpoint | Purpose |
|---|---|---|
| GET | / |
Serve web interface |
| POST | /api/convert |
Convert IPYNB to PDF |
| GET | /api/health |
Health check |
file_Converter/
├── app.py # Flask application (2874 bytes)
├── requirements.txt # Dependencies (123 bytes)
├── templates/
│ └── index.html # Web UI (13580 bytes)
├── sample_notebook.ipynb # Test file
├── README.md # Full documentation
├── SETUP.md # Quick start guide
├── .env.example # Environment template
└── .gitignore # Git ignore rules
- ✅ Chrome/Edge (latest)
- ✅ Firefox (latest)
- ✅ Safari (latest)
- ✅ Mobile browsers
- Maximum file size: 50MB
- Only .ipynb files supported
- Requires pandoc installation
- Works best with modern browsers
- Batch Processing - Convert multiple files at once
- PDF Customization - Choose output style/theme
- File History - Keep track of converted files
- Email Delivery - Send PDF via email
- Format Support - Add HTML, DOCX export
- Authentication - User accounts and file management
- Advanced Features - Page numbers, TOC, custom headers
- API Key System - For programmatic access
| Issue | Solution |
|---|---|
| Pandoc not found | sudo apt-get install pandoc |
| Module not found | pip install -r requirements.txt |
| Port in use | lsof -ti :5000 | xargs kill -9 |
| CORS error | Check Flask-CORS is installed |
- ✅ Install dependencies:
pip install -r requirements.txt - ✅ Install pandoc:
sudo apt-get install pandoc - ✅ Run the application:
python app.py - ✅ Open http://localhost:5000
- ✅ Test with sample_notebook.ipynb
- README.md - Comprehensive documentation
- SETUP.md - Quick start and troubleshooting
- Code Comments - Inline documentation in app.py
- Sample File - sample_notebook.ipynb for testing
- Code is well-commented for easy customization
- Follows Flask best practices
- Modern CSS with gradient design
- Vanilla JavaScript (no external dependencies)
- Production-ready structure
Ready to use! Install dependencies and run python app.py to get started.