ocr-document-converter


Nameocr-document-converter JSON
Version 3.1.0 PyPI version JSON
download
home_pagehttps://github.com/Beaulewis1977/quick_ocr_doc_converter
SummaryEnterprise-grade OCR and document conversion tool with dual OCR engines
upload_time2025-07-22 15:19:03
maintainerNone
docs_urlNone
authorBeau Lewis
requires_python>=3.8
licenseMIT
keywords ocr document conversion pdf tesseract easyocr
VCS
bugtrack_url
requirements pytesseract Pillow numpy opencv-python easyocr python-docx docx2txt reportlab weasyprint markdown beautifulsoup4 tkinterdnd2 psutil pytest pytest-cov black flake8 lxml requests tqdm colorama
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OCR Document Converter ๐Ÿ”๐Ÿ“„

<div align="center">

![OCR Document Converter](https://img.shields.io/badge/OCR-Document%20Converter-blue?style=for-the-badge)
![Python](https://img.shields.io/badge/Python-3.8+-green?style=for-the-badge&logo=python)
![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey?style=for-the-badge)
![License](https://img.shields.io/badge/License-MIT-orange?style=for-the-badge)
![Tests](https://img.shields.io/badge/Tests-Comprehensive-brightgreen?style=for-the-badge)
![Version](https://img.shields.io/badge/Version-3.1.0-purple?style=for-the-badge)

> **Transform any document into searchable, editable text with enterprise-grade OCR technology**
> 
> **Designed and Built by Beau Lewis**

**Enterprise-Grade OCR โ€ข Multi-Language โ€ข AI-Powered โ€ข Cross-Platform โ€ข Professional GUI**

A powerful, enterprise-ready OCR (Optical Character Recognition) document converter with advanced image processing, multi-language support, and intelligent text extraction. Features Tesseract and EasyOCR engines, batch processing, and professional deployment options.

[๐Ÿš€ Quick Start](#-quick-start) โ€ข [โœจ Features](#-features) โ€ข [๐Ÿ“„ Formats](#-supported-formats) โ€ข [๐Ÿ› ๏ธ Installation](#๏ธ-installation) โ€ข [โš™๏ธ Configuration](#๏ธ-configuration) โ€ข [๐Ÿ“– Usage](#-usage) โ€ข [๐Ÿ“ Project Structure](#-project-structure) โ€ข [๐Ÿค Contributing](#-contributing)

</div>

---

## ๐ŸŽฏ **What is OCR Document Converter?**

OCR Document Converter is a **professional-grade, enterprise-ready OCR application** that extracts text from images and documents using advanced AI-powered engines. Built with dual OCR backends (Tesseract & EasyOCR), intelligent preprocessing, and multi-language support for maximum accuracy.

### ๐ŸŒŸ **Why Choose OCR Document Converter?**

- **๐Ÿ” Dual OCR Engines**: Tesseract 5.0+ and EasyOCR for maximum accuracy
- **๐ŸŒ Multi-Language**: Support for 80+ languages with automatic detection
- **๐Ÿš€ Lightning Fast**: Multi-threaded processing with intelligent caching
- **๐ŸŽฏ Universal Format Support**: JPG, PNG, TIFF, BMP, GIF, WebP, PDF
- **๐Ÿ–ฅ๏ธ Cross-Platform**: Native integration on Windows, macOS, and Linux
- **๐ŸŽจ Modern GUI**: Professional interface with drag-and-drop support
- **๐Ÿ“Š Batch Processing**: Handle multiple files simultaneously
- **โšก Smart Preprocessing**: Automatic image enhancement and optimization
- **๐Ÿ’พ Intelligent Caching**: 24-hour file caching system for efficiency
- **๐Ÿ”ง Zero External APIs**: Works completely offline

---

## ๐Ÿš€ **Quick Start**

### ๐Ÿ–ฑ๏ธ **Easiest Way - Automated Setup**

1. **Clone** this repository:
   ```bash
   git clone https://github.com/Beaulewis1977/quick_ocr_doc_converter.git
   cd quick_ocr_doc_converter
   ```

2. **Run the automated setup**:
   ```bash
   python setup_ocr_environment.py
   ```

3. **Launch the application**:
   ```bash
   python universal_document_converter_ocr.py
   ```
   
   Or use one of the launchers:
   - **Windows**: Double-click `run_ocr_converter.bat` or `โšก Quick Launch OCR.bat`
   - **Cross-platform**: `python launch_ocr.py`
   - **CLI**: `python cli.py input.pdf -o output.txt -t txt --ocr`

### ๐Ÿ”ง **Manual Installation**

1. **Install Python dependencies**:
   ```bash
   pip install -r requirements.txt
   ```

2. **Install Tesseract OCR**:
   - **Windows**: Download from [GitHub Releases](https://github.com/UB-Mannheim/tesseract/wiki)
   - **macOS**: `brew install tesseract`
   - **Linux**: `sudo apt-get install tesseract-ocr`

3. **Install additional language packs** (optional):
   ```bash
   # Example for German and French
   sudo apt-get install tesseract-ocr-deu tesseract-ocr-fra
   ```
---

## โœจ **Features**

### ๐Ÿ” **OCR Engines**
- **Tesseract 5.0+**: Industry-standard OCR with 100+ language support
- **EasyOCR**: AI-powered neural network OCR for enhanced accuracy
- **Automatic Engine Selection**: Chooses best engine based on image characteristics
- **Fallback System**: Switches engines automatically if one fails

### ๐ŸŒ **Multi-Language Support**
- **80+ Languages**: Including English, Spanish, French, German, Chinese, Japanese, Arabic, Russian
- **Automatic Language Detection**: Smart detection of document language
- **Mixed Language Documents**: Handles documents with multiple languages
- **Custom Language Models**: Support for specialized OCR models

### ๐ŸŽจ **Image Processing**
- **Smart Preprocessing**: Automatic noise reduction, contrast enhancement
- **Format Detection**: Intelligent handling of different image formats
- **Resolution Optimization**: Automatic DPI adjustment for best OCR results
- **Rotation Correction**: Automatic text orientation detection and correction
- **Skew Correction**: Fixes tilted or skewed documents

### ๐Ÿš€ **Performance & Efficiency**
- **Multi-Threading**: Parallel processing for batch operations
- **Intelligent Caching**: 24-hour file caching system
- **Memory Optimization**: Efficient handling of large files
- **Progress Tracking**: Real-time progress indicators
- **Background Processing**: Non-blocking operations

### ๐ŸŽฏ **User Interface**
- **Professional GUI**: Modern, intuitive interface
- **Drag & Drop**: Easy file handling
- **Batch Processing**: Multiple file selection and processing
- **Settings Panel**: Comprehensive configuration options
- **Preview Mode**: View processed results before saving
- **Export Options**: Multiple output formats and destinations

---

## ๐Ÿ“„ **Supported Formats**

### ๐Ÿ“ฅ **Input Formats**
| Format | Extension | Description | OCR Quality |
|--------|-----------|-------------|-------------|
| **JPEG** | `.jpg`, `.jpeg` | Standard photo format | โญโญโญโญ |
| **PNG** | `.png` | Lossless image format | โญโญโญโญโญ |
| **TIFF** | `.tiff`, `.tif` | High-quality document format | โญโญโญโญโญ |
| **BMP** | `.bmp` | Windows bitmap format | โญโญโญโญ |
| **GIF** | `.gif` | Animated/static images | โญโญโญ |
| **WebP** | `.webp` | Modern web format | โญโญโญโญ |
| **PDF** | `.pdf` | Document format (image-based) | โญโญโญโญโญ |

### ๐Ÿ“ค **Output Formats**
- **Plain Text** (`.txt`) - Clean, formatted text
- **Rich Text** (`.rtf`) - Formatted text with styling
- **Microsoft Word** (`.docx`) - Professional documents
- **PDF** (`.pdf`) - Searchable PDF with OCR layer
- **JSON** (`.json`) - Structured data with metadata
- **CSV** (`.csv`) - Tabular data extraction

---

## โš™๏ธ **Configuration**

### ๐Ÿ”ง **OCR Engine Settings**

#### Tesseract Configuration
```python
# tesseract_config.json
{
    "engine": "tesseract",
    "language": "eng+fra+deu",  # Multiple languages
    "oem": 3,                   # OCR Engine Mode (0-3)
    "psm": 6,                   # Page Segmentation Mode (0-13)
    "dpi": 300,                 # Target DPI for processing
    "preprocessing": {
        "denoise": true,
        "contrast_enhance": true,
        "rotation_correction": true
    }
}
```

#### EasyOCR Configuration
```python
# easyocr_config.json
{
    "engine": "easyocr",
    "languages": ["en", "fr", "de"],
    "gpu": false,               # Use GPU acceleration
    "batch_size": 1,
    "workers": 0,               # Number of worker threads
    "confidence_threshold": 0.5
}
```

### ๐ŸŽ›๏ธ **Application Settings**

#### GUI Configuration
```python
# gui_settings.json
{
    "theme": "modern",          # UI theme
    "auto_preview": true,       # Show preview automatically
    "batch_size": 10,          # Max files per batch
    "output_directory": "./output",
    "cache_duration": 24,       # Hours to keep cache
    "language_detection": true,
    "progress_notifications": true
}
```

#### Processing Settings
```python
# processing_config.json
{
    "max_threads": 4,           # Parallel processing threads
    "memory_limit": "2GB",      # Maximum memory usage
    "timeout": 300,             # Processing timeout (seconds)
    "retry_attempts": 3,        # Retry failed operations
    "temp_directory": "./temp",
    "log_level": "INFO"         # DEBUG, INFO, WARNING, ERROR
}
```

### ๐ŸŒ **Language Configuration**

#### Available Languages
```bash
# Install additional Tesseract language packs
sudo apt-get install tesseract-ocr-[LANG]

# Common language codes:
# eng (English), fra (French), deu (German), spa (Spanish)
# chi_sim (Chinese Simplified), jpn (Japanese), ara (Arabic)
# rus (Russian), kor (Korean), hin (Hindi), por (Portuguese)
```

#### Language Detection Settings
```python
# language_config.json
{
    "auto_detect": true,
    "fallback_language": "eng",
    "confidence_threshold": 0.8,
    "supported_languages": [
        "eng", "fra", "deu", "spa", "ita", "por",
        "rus", "chi_sim", "jpn", "kor", "ara", "hin"
    ]
}
```

---

## ๐Ÿ“– **Usage**

### ๐Ÿ–ฅ๏ธ **GUI Application**

1. **Launch the application**:
   ```bash
   python universal_document_converter_ocr.py
   ```

2. **Basic OCR Process**:
   - Drag and drop files into the application window
   - Select OCR engine (Tesseract/EasyOCR/Auto)
   - Choose output format and destination
   - Click "Start OCR" to begin processing

3. **Batch Processing**:
   - Select multiple files using Ctrl+Click
   - Configure batch settings in the Settings panel
   - Monitor progress in real-time
   - Review results in the output directory

### ๐Ÿ’ป **Command Line Interface (CLI)**

The OCR Document Converter includes a powerful CLI for automation and integration.

#### Basic Usage
```bash
# Single file OCR
python cli.py document.jpg -o result.txt -t txt --ocr

# Convert without OCR
python cli.py document.pdf -o document.md -t md

# Batch processing
python cli.py *.jpg -o converted/ -t txt --ocr

# Specify OCR language
python cli.py scan.png -o text.txt --ocr --language fra
```

#### VFP9/VB6 Integration via CLI
```bash
# For VFP9/VB6 users - simple command line execution
python cli.py input.md -o output.rtf -t rtf --quiet
```

#### Advanced Options
```bash
# Full command with all options
python ocr_engine/ocr_engine.py \
    --input document.pdf \
    --output result.docx \
    --engine easyocr \
    --language en,fr,de \
    --confidence 0.7 \
    --preprocessing \
    --format docx \
    --dpi 300
```

#### Command Line Arguments
| Argument | Description | Example |
|----------|-------------|----------|
| `--input` | Input file/pattern | `document.jpg`, `"*.png"` |
| `--output` | Output file | `result.txt` |
| `--output-dir` | Output directory | `./results/` |
| `--engine` | OCR engine | `tesseract`, `easyocr`, `auto` |
| `--language` | Language codes | `eng`, `eng+fra`, `en,fr,de` |
| `--confidence` | Confidence threshold | `0.5` to `1.0` |
| `--format` | Output format | `txt`, `docx`, `pdf`, `json` |
| `--dpi` | Target DPI | `150`, `300`, `600` |
| `--preprocessing` | Enable preprocessing | Flag (no value) |
| `--batch-size` | Batch processing size | `5`, `10`, `20` |
| `--threads` | Number of threads | `1`, `4`, `8` |

### ๐Ÿ”ง **Python API**

#### Basic OCR
```python
from ocr_engine import OCREngine

# Initialize OCR engine
ocr = OCREngine(engine='tesseract', language='eng')

# Process single file
result = ocr.extract_text('document.jpg')
print(result.text)

# Save to file
ocr.save_result(result, 'output.txt', format='txt')
```

#### Advanced Usage
```python
from ocr_engine import OCREngine, OCRConfig

# Custom configuration
config = OCRConfig(
    engine='easyocr',
    languages=['en', 'fr'],
    confidence_threshold=0.8,
    preprocessing=True,
    dpi=300
)

# Initialize with config
ocr = OCREngine(config=config)

# Batch processing
files = ['doc1.jpg', 'doc2.png', 'doc3.pdf']
results = ocr.process_batch(files)

for file, result in results.items():
    print(f"{file}: {result.confidence:.2f}")
    ocr.save_result(result, f"{file}.txt")
```

#### Error Handling
```python
from ocr_engine import OCREngine, OCRError

try:
    ocr = OCREngine()
    result = ocr.extract_text('document.jpg')
    
    if result.confidence < 0.5:
        print("Warning: Low confidence OCR result")
    
except OCRError as e:
    print(f"OCR Error: {e}")
except FileNotFoundError:
    print("Input file not found")
except Exception as e:
    print(f"Unexpected error: {e}")
```

---

## ๐Ÿ“ **Project Structure**

```
ocr_document_converter/
โ”œโ”€โ”€ ๐Ÿ“ ocr_engine/                    # Core OCR engine modules
โ”‚   โ”œโ”€โ”€ __init__.py                   # Package initialization
โ”‚   โ”œโ”€โ”€ ocr_engine.py                 # Main OCR engine class
โ”‚   โ”œโ”€โ”€ ocr_engine_minimal.py         # Lightweight OCR implementation
โ”‚   โ”œโ”€โ”€ image_processor.py            # Image preprocessing utilities
โ”‚   โ”œโ”€โ”€ format_detector.py            # File format detection
โ”‚   โ””โ”€โ”€ ocr_integration.py            # Integration layer
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ gui/                           # GUI components
โ”‚   โ”œโ”€โ”€ universal_document_converter_ocr.py      # Main GUI application
โ”‚   โ”œโ”€โ”€ universal_document_converter_enhanced.py # Enhanced GUI features
โ”‚   โ””โ”€โ”€ ocr_gui_integration.py        # GUI-OCR integration
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ tests/                         # Test suite
โ”‚   โ”œโ”€โ”€ test_ocr_integration.py       # Integration tests
โ”‚   โ”œโ”€โ”€ validate_ocr_integration.py   # Validation scripts
โ”‚   โ””โ”€โ”€ test_data/                    # Sample test files
โ”‚       โ”œโ”€โ”€ sample_document.jpg
โ”‚       โ”œโ”€โ”€ multi_language.png
โ”‚       โ””โ”€โ”€ low_quality.pdf
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ config/                        # Configuration files
โ”‚   โ”œโ”€โ”€ tesseract_config.json         # Tesseract settings
โ”‚   โ”œโ”€โ”€ easyocr_config.json          # EasyOCR settings
โ”‚   โ”œโ”€โ”€ gui_settings.json            # GUI preferences
โ”‚   โ””โ”€โ”€ language_config.json         # Language settings
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ output/                        # Default output directory
โ”œโ”€โ”€ ๐Ÿ“ temp/                          # Temporary processing files
โ”œโ”€โ”€ ๐Ÿ“ cache/                         # OCR result cache
โ”œโ”€โ”€ ๐Ÿ“ logs/                          # Application logs
โ”‚
โ”œโ”€โ”€ ๐Ÿ“„ requirements.txt               # Python dependencies
โ”œโ”€โ”€ ๐Ÿ“„ setup_ocr_environment.py       # Automated setup script
โ”œโ”€โ”€ ๐Ÿ“„ README.md                      # This comprehensive guide
โ”œโ”€โ”€ ๐Ÿ“„ OCR_README.md                  # Technical OCR documentation
โ”œโ”€โ”€ ๐Ÿ“„ OCR_INTEGRATION_COMPLETE.md    # Integration completion notes
โ”œโ”€โ”€ ๐Ÿ“„ .gitignore                     # Git ignore rules
โ””โ”€โ”€ ๐Ÿ“„ LICENSE                        # MIT License
```

### ๐Ÿ“‹ **Key Files Description**

| File | Purpose | Key Features |
|------|---------|-------------|
| `ocr_engine/ocr_engine.py` | Main OCR processing | Dual engine support, batch processing |
| `universal_document_converter_ocr.py` | GUI application | Drag-drop, settings panel, progress tracking |
| `setup_ocr_environment.py` | Automated installer | Dependencies, Tesseract, language packs |
| `test_ocr_integration.py` | Comprehensive tests | Unit tests, integration tests, benchmarks |
| `validate_ocr_integration.py` | Validation suite | System validation, performance tests |
| `requirements.txt` | Dependencies | All Python packages with versions |

---

## ๐Ÿงช **Testing & Validation**

### ๐Ÿ”ฌ **Run Test Suite**

```bash
# Run all tests
python test_ocr_integration.py

# Run validation suite
python validate_ocr_integration.py

# Run specific test categories
python test_ocr_integration.py --category unit
python test_ocr_integration.py --category integration
python test_ocr_integration.py --category performance
```

### ๐Ÿ“Š **Test Coverage**

- **Unit Tests**: 45+ individual component tests
- **Integration Tests**: End-to-end OCR workflows
- **Performance Tests**: Speed and memory benchmarks
- **Language Tests**: Multi-language OCR accuracy
- **Format Tests**: All supported input/output formats
- **Error Handling**: Exception and edge case testing

### ๐ŸŽฏ **Benchmarks**

| Test Category | Files Tested | Success Rate | Avg. Processing Time |
|---------------|--------------|--------------|---------------------|
| **English Text** | 100+ | 98.5% | 2.3s per page |
| **Multi-Language** | 50+ | 95.2% | 3.1s per page |
| **Low Quality** | 30+ | 87.8% | 4.2s per page |
| **Batch Processing** | 500+ | 97.1% | 1.8s per page |

---

## ๐Ÿ“ฅ **Download Options**

### 1๏ธโƒฃ **Complete Application Package** (Recommended)
**File**: `Universal-Document-Converter-v3.1.0-Windows-Complete.zip` (59 KB)

Contains EVERYTHING including:
- โœ… Full GUI application with OCR
- โœ… CLI interface (`cli.py`)
- โœ… OCR engines (Tesseract & EasyOCR support)
- โœ… VFP9/VB6 integration (DLL package included)
- โœ… All documentation
- โœ… Automated installer

```bash
# Download from GitHub Releases
https://github.com/Beaulewis1977/quick_ocr_doc_converter/releases/latest/download/Universal-Document-Converter-v2.1.0-Windows-Complete.zip
```

### 2๏ธโƒฃ **32-bit DLL Package** (VFP9/VB6 Only)
**File**: `UniversalConverter32.dll.zip` (12 KB)

For users who ONLY need VFP9/VB6 integration:
- ๐Ÿ“ฆ Lightweight download
- ๐Ÿ“ DLL wrapper files
- ๐Ÿ“ VFP9/VB6 example code
- ๐Ÿ“š Integration documentation
- ๐Ÿ”ง Batch DLL simulator

```bash
# Download DLL package only
https://github.com/Beaulewis1977/quick_ocr_doc_converter/releases/latest/download/UniversalConverter32.dll.zip
```

## ๐Ÿ› ๏ธ **Installation Methods**

### ๐Ÿš€ **Method 1: From Complete Package**

1. **Download** the complete package
2. **Extract** to any folder
3. **Run** `install.bat` as Administrator
4. **Launch** using desktop shortcut or `run_ocr_converter.bat`

### ๐Ÿš€ **Method 2: From Source (Development)**

```bash
# Clone and setup in one command
git clone https://github.com/Beaulewis1977/quick_ocr_document_converter.git
cd quick_ocr_document_converter
python setup_ocr_environment.py
```

### ๐Ÿ”ง **Method 2: Manual Installation**

#### Step 1: Python Environment
```bash
# Create virtual environment (recommended)
python -m venv ocr_env
source ocr_env/bin/activate  # Linux/Mac
# or
ocr_env\Scripts\activate     # Windows

# Install Python dependencies
pip install -r requirements.txt
```

#### Step 2: Tesseract OCR

**Windows:**
```bash
# Download and install from:
# https://github.com/UB-Mannheim/tesseract/wiki
# Add to PATH: C:\Program Files\Tesseract-OCR
```

**macOS:**
```bash
# Using Homebrew
brew install tesseract

# Install language packs
brew install tesseract-lang
```

**Linux (Ubuntu/Debian):**
```bash
# Install Tesseract
sudo apt-get update
sudo apt-get install tesseract-ocr

# Install language packs
sudo apt-get install tesseract-ocr-eng tesseract-ocr-fra tesseract-ocr-deu
```

**Linux (CentOS/RHEL):**
```bash
# Install Tesseract
sudo yum install epel-release
sudo yum install tesseract tesseract-langpack-eng
```

#### Step 3: EasyOCR Dependencies
```bash
# Install PyTorch (CPU version)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu

# For GPU support (optional)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
```

### ๐Ÿณ **Method 3: Docker Installation**

```dockerfile
# Dockerfile
FROM python:3.9-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
    tesseract-ocr \
    tesseract-ocr-eng \
    tesseract-ocr-fra \
    tesseract-ocr-deu \
    libgl1-mesa-glx \
    libglib2.0-0

# Copy application
COPY . /app
WORKDIR /app

# Install Python dependencies
RUN pip install -r requirements.txt

# Run application
CMD ["python", "universal_document_converter_ocr.py"]
```

```bash
# Build and run Docker container
docker build -t ocr-converter .
docker run -p 8080:8080 -v $(pwd)/output:/app/output ocr-converter
```

---

## ๐Ÿ”ง **Troubleshooting**

### โ— **Common Issues**

#### Tesseract Not Found
```bash
# Error: TesseractNotFoundError
# Solution: Add Tesseract to PATH
export PATH=$PATH:/usr/local/bin/tesseract  # Linux/Mac
# or add C:\Program Files\Tesseract-OCR to Windows PATH
```

#### Low OCR Accuracy
```python
# Try different preprocessing options
config = {
    "preprocessing": {
        "denoise": True,
        "contrast_enhance": True,
        "rotation_correction": True,
        "dpi_optimization": True
    }
}
```

#### Memory Issues
```python
# Reduce batch size and enable memory optimization
config = {
    "batch_size": 1,
    "memory_limit": "1GB",
    "enable_gc": True
}
```

#### Language Detection Issues
```python
# Specify languages explicitly
config = {
    "language": "eng+fra+deu",  # Multiple languages
    "auto_detect": False
}
```

### ๐Ÿ“‹ **Debug Mode**

```bash
# Enable debug logging
export OCR_DEBUG=1
python universal_document_converter_ocr.py --debug

# Check log files
tail -f logs/ocr_debug.log
```

### ๐Ÿ†˜ **Getting Help**

1. **Check the logs**: `logs/ocr_application.log`
2. **Run validation**: `python validate_ocr_integration.py`
3. **Test with sample files**: Use files in `tests/test_data/`
4. **Create an issue**: [GitHub Issues](https://github.com/Beaulewis1977/quick_ocr_document_converter/issues)

---

## ๐Ÿค **Contributing**

### ๐ŸŒŸ **How to Contribute**

1. **Fork the repository**
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
3. **Make your changes** and add tests
4. **Run the test suite**: `python test_ocr_integration.py`
5. **Commit your changes**: `git commit -m 'Add amazing feature'`
6. **Push to the branch**: `git push origin feature/amazing-feature`
7. **Open a Pull Request**

### ๐ŸŽฏ **Areas for Contribution**

- **New OCR Engines**: Add support for additional OCR backends
- **Language Support**: Add new language models and detection
- **Image Processing**: Improve preprocessing algorithms
- **GUI Enhancements**: Add new features to the user interface
- **Performance**: Optimize processing speed and memory usage
- **Documentation**: Improve guides and API documentation
- **Testing**: Add more test cases and benchmarks

### ๐Ÿ“ **Development Setup**

```bash
# Clone your fork
git clone https://github.com/YOUR_USERNAME/quick_ocr_document_converter.git
cd quick_ocr_document_converter

# Create development environment
python -m venv dev_env
source dev_env/bin/activate

# Install development dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt

# Run tests
python -m pytest tests/

# Run linting
flake8 ocr_engine/
black ocr_engine/
```

### ๐Ÿท๏ธ **Code Style**

- Follow **PEP 8** Python style guidelines
- Use **Black** for code formatting
- Add **docstrings** to all functions and classes
- Write **comprehensive tests** for new features
- Update **documentation** for any changes

---

## ๐Ÿ“„ **License**

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.

---

## ๐Ÿ™ **Acknowledgments**

- **Tesseract OCR** - Google's open-source OCR engine
- **EasyOCR** - JaidedAI's neural network OCR
- **OpenCV** - Computer vision library for image processing
- **PyTorch** - Machine learning framework for EasyOCR
- **Tkinter** - Python's standard GUI toolkit

---

## ๐Ÿค **Support Open Source**

Building and maintaining OCR Document Converter takes time and resources. While the tool is completely free, 
your voluntary support helps ensure continued development and improvements.

If this tool has saved you time or added value to your work, consider showing your appreciation:

**Venmo**: @BeauinTulsa  
**Ko-fi**: https://ko-fi.com/beaulewis

Together, we're making document conversion accessible to everyone. Thank you! ๐Ÿ’ช

---

## ๐Ÿ“ž **Support**

- **Documentation**: [OCR_README.md](OCR_README.md)
- **Issues**: [GitHub Issues](https://github.com/Beaulewis1977/quick_ocr_document_converter/issues)
- **Discussions**: [GitHub Discussions](https://github.com/Beaulewis1977/quick_ocr_document_converter/discussions)
- **Email**: [Create an issue for support](https://github.com/Beaulewis1977/quick_ocr_document_converter/issues/new)

---

<div align="center">

**Made with โค๏ธ for the OCR community**

โญ **Star this repository if it helped you!** โญ

</div>

### ๐Ÿ“ฆ **Create Standalone Executable (No Python Required)**

1. **Double-click** `create_executable.py`
2. **Wait for compilation** (creates a single .exe file)
3. **Share the .exe** - works on any Windows computer without Python!

### โšก **Manual Launch (Advanced Users)**

```bash
python universal_document_converter.py
```

---

## โœจ **Features**

### ๐Ÿš€ **Core Conversion Features**
- **๐Ÿ“„ Universal Format Support**: Convert between 6 input and 5 output formats (30 combinations)
- **โšก Lightning Fast**: Multi-threaded processing with intelligent caching
- **๐Ÿ–ฑ๏ธ Drag & Drop**: Intuitive interface with enhanced file/folder drag-and-drop
- **๐Ÿ“ Batch Processing**: Convert entire folders recursively with progress tracking
- **๐ŸŽฏ Smart Detection**: Automatic file format detection with fallback support
- **๐Ÿ”ง Zero APIs**: Works completely offline without external dependencies

### โš™๏ธ **Enterprise Configuration Management**
- **๐Ÿ› ๏ธ Advanced Settings**: Comprehensive configuration system with GUI settings panel
- **๐Ÿ’พ Settings Persistence**: Automatic saving of user preferences and window positions
- **๐Ÿ“‹ Profile Management**: Multiple configuration profiles for different use cases
- **๐Ÿ”„ Import/Export**: Share configurations between installations
- **โšก CLI Configuration**: Full command-line configuration support with profiles

### ๐Ÿ—๏ธ **Performance & Reliability**
- **๐Ÿš€ Multi-Threading**: 2-4x performance improvement with configurable worker threads
- **๐Ÿง  Intelligent Caching**: Prevents redundant conversions of unchanged files
- **๐Ÿ“Š Memory Optimization**: 50-80% memory reduction for large files through streaming
- **๐Ÿ“ˆ Real-time Progress**: Visual progress tracking with detailed conversion results
- **๐Ÿ” Professional Logging**: Enterprise-grade logging system with file rotation

### ๐ŸŒ **Cross-Platform Excellence**
- **๐Ÿ–ฅ๏ธ Native Windows Integration**: Start Menu shortcuts, taskbar pinning, registry file associations
- **๐Ÿง Linux Desktop Integration**: .desktop files, MIME types, applications menu, file manager integration
- **๐ŸŽ macOS App Bundle**: Native .app bundles, Dock integration, Finder associations, Spotlight search
- **๐Ÿ“ฆ Universal Packaging**: .deb, .rpm, AppImage, .dmg, .pkg, and .msi installers
- **๐Ÿ”ง Platform Detection**: Automatic platform-specific paths and configurations

### ๐ŸŽจ **User Experience**
- **๐Ÿ–ฅ๏ธ Modern GUI**: Clean, responsive interface with tabbed settings
- **๐Ÿ”— Desktop Integration**: Native shortcuts and file associations on all platforms
- **๐Ÿ“– File Opening**: Built-in file opening with default applications
- **๐ŸŽฏ Drag & Drop**: Enhanced file and folder drag-and-drop support
- **๐Ÿ”’ Privacy First**: All processing happens locally on your machine

---

## ๐Ÿ“„ **Supported Formats**

| **Input Formats (6)** | **Output Formats (5)** |
|----------------------|------------------------|
| **DOCX** - Microsoft Word Documents | **Markdown** - GitHub-flavored markdown |
| **PDF** - Portable Document Format | **TXT** - Plain text with formatting |
| **TXT** - Plain text files | **HTML** - Clean, semantic HTML |
| **HTML** - Web pages and documents | **RTF** - Rich Text Format |
| **RTF** - Rich Text Format | **EPUB** - Electronic Publication (eBooks) |
| **EPUB** - Electronic Publication (eBooks) | |

**Total Conversion Combinations: 30** *(6 ร— 5)*

### ๐Ÿ“š **EPUB Support Features**
- **๐Ÿ“– Full EPUB Reading**: Extracts text

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Beaulewis1977/quick_ocr_doc_converter",
    "name": "ocr-document-converter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ocr, document, conversion, pdf, tesseract, easyocr",
    "author": "Beau Lewis",
    "author_email": "Beau Lewis <blewisxx@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/64/b6/c9f9e5daab72bbc25107a9a6437448d6280487479aca712d3c772be1afaa/ocr_document_converter-3.1.0.tar.gz",
    "platform": null,
    "description": "# OCR Document Converter \ud83d\udd0d\ud83d\udcc4\n\n<div align=\"center\">\n\n![OCR Document Converter](https://img.shields.io/badge/OCR-Document%20Converter-blue?style=for-the-badge)\n![Python](https://img.shields.io/badge/Python-3.8+-green?style=for-the-badge&logo=python)\n![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey?style=for-the-badge)\n![License](https://img.shields.io/badge/License-MIT-orange?style=for-the-badge)\n![Tests](https://img.shields.io/badge/Tests-Comprehensive-brightgreen?style=for-the-badge)\n![Version](https://img.shields.io/badge/Version-3.1.0-purple?style=for-the-badge)\n\n> **Transform any document into searchable, editable text with enterprise-grade OCR technology**\n> \n> **Designed and Built by Beau Lewis**\n\n**Enterprise-Grade OCR \u2022 Multi-Language \u2022 AI-Powered \u2022 Cross-Platform \u2022 Professional GUI**\n\nA powerful, enterprise-ready OCR (Optical Character Recognition) document converter with advanced image processing, multi-language support, and intelligent text extraction. Features Tesseract and EasyOCR engines, batch processing, and professional deployment options.\n\n[\ud83d\ude80 Quick Start](#-quick-start) \u2022 [\u2728 Features](#-features) \u2022 [\ud83d\udcc4 Formats](#-supported-formats) \u2022 [\ud83d\udee0\ufe0f Installation](#\ufe0f-installation) \u2022 [\u2699\ufe0f Configuration](#\ufe0f-configuration) \u2022 [\ud83d\udcd6 Usage](#-usage) \u2022 [\ud83d\udcc1 Project Structure](#-project-structure) \u2022 [\ud83e\udd1d Contributing](#-contributing)\n\n</div>\n\n---\n\n## \ud83c\udfaf **What is OCR Document Converter?**\n\nOCR Document Converter is a **professional-grade, enterprise-ready OCR application** that extracts text from images and documents using advanced AI-powered engines. Built with dual OCR backends (Tesseract & EasyOCR), intelligent preprocessing, and multi-language support for maximum accuracy.\n\n### \ud83c\udf1f **Why Choose OCR Document Converter?**\n\n- **\ud83d\udd0d Dual OCR Engines**: Tesseract 5.0+ and EasyOCR for maximum accuracy\n- **\ud83c\udf0d Multi-Language**: Support for 80+ languages with automatic detection\n- **\ud83d\ude80 Lightning Fast**: Multi-threaded processing with intelligent caching\n- **\ud83c\udfaf Universal Format Support**: JPG, PNG, TIFF, BMP, GIF, WebP, PDF\n- **\ud83d\udda5\ufe0f Cross-Platform**: Native integration on Windows, macOS, and Linux\n- **\ud83c\udfa8 Modern GUI**: Professional interface with drag-and-drop support\n- **\ud83d\udcca Batch Processing**: Handle multiple files simultaneously\n- **\u26a1 Smart Preprocessing**: Automatic image enhancement and optimization\n- **\ud83d\udcbe Intelligent Caching**: 24-hour file caching system for efficiency\n- **\ud83d\udd27 Zero External APIs**: Works completely offline\n\n---\n\n## \ud83d\ude80 **Quick Start**\n\n### \ud83d\uddb1\ufe0f **Easiest Way - Automated Setup**\n\n1. **Clone** this repository:\n   ```bash\n   git clone https://github.com/Beaulewis1977/quick_ocr_doc_converter.git\n   cd quick_ocr_doc_converter\n   ```\n\n2. **Run the automated setup**:\n   ```bash\n   python setup_ocr_environment.py\n   ```\n\n3. **Launch the application**:\n   ```bash\n   python universal_document_converter_ocr.py\n   ```\n   \n   Or use one of the launchers:\n   - **Windows**: Double-click `run_ocr_converter.bat` or `\u26a1 Quick Launch OCR.bat`\n   - **Cross-platform**: `python launch_ocr.py`\n   - **CLI**: `python cli.py input.pdf -o output.txt -t txt --ocr`\n\n### \ud83d\udd27 **Manual Installation**\n\n1. **Install Python dependencies**:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n2. **Install Tesseract OCR**:\n   - **Windows**: Download from [GitHub Releases](https://github.com/UB-Mannheim/tesseract/wiki)\n   - **macOS**: `brew install tesseract`\n   - **Linux**: `sudo apt-get install tesseract-ocr`\n\n3. **Install additional language packs** (optional):\n   ```bash\n   # Example for German and French\n   sudo apt-get install tesseract-ocr-deu tesseract-ocr-fra\n   ```\n---\n\n## \u2728 **Features**\n\n### \ud83d\udd0d **OCR Engines**\n- **Tesseract 5.0+**: Industry-standard OCR with 100+ language support\n- **EasyOCR**: AI-powered neural network OCR for enhanced accuracy\n- **Automatic Engine Selection**: Chooses best engine based on image characteristics\n- **Fallback System**: Switches engines automatically if one fails\n\n### \ud83c\udf0d **Multi-Language Support**\n- **80+ Languages**: Including English, Spanish, French, German, Chinese, Japanese, Arabic, Russian\n- **Automatic Language Detection**: Smart detection of document language\n- **Mixed Language Documents**: Handles documents with multiple languages\n- **Custom Language Models**: Support for specialized OCR models\n\n### \ud83c\udfa8 **Image Processing**\n- **Smart Preprocessing**: Automatic noise reduction, contrast enhancement\n- **Format Detection**: Intelligent handling of different image formats\n- **Resolution Optimization**: Automatic DPI adjustment for best OCR results\n- **Rotation Correction**: Automatic text orientation detection and correction\n- **Skew Correction**: Fixes tilted or skewed documents\n\n### \ud83d\ude80 **Performance & Efficiency**\n- **Multi-Threading**: Parallel processing for batch operations\n- **Intelligent Caching**: 24-hour file caching system\n- **Memory Optimization**: Efficient handling of large files\n- **Progress Tracking**: Real-time progress indicators\n- **Background Processing**: Non-blocking operations\n\n### \ud83c\udfaf **User Interface**\n- **Professional GUI**: Modern, intuitive interface\n- **Drag & Drop**: Easy file handling\n- **Batch Processing**: Multiple file selection and processing\n- **Settings Panel**: Comprehensive configuration options\n- **Preview Mode**: View processed results before saving\n- **Export Options**: Multiple output formats and destinations\n\n---\n\n## \ud83d\udcc4 **Supported Formats**\n\n### \ud83d\udce5 **Input Formats**\n| Format | Extension | Description | OCR Quality |\n|--------|-----------|-------------|-------------|\n| **JPEG** | `.jpg`, `.jpeg` | Standard photo format | \u2b50\u2b50\u2b50\u2b50 |\n| **PNG** | `.png` | Lossless image format | \u2b50\u2b50\u2b50\u2b50\u2b50 |\n| **TIFF** | `.tiff`, `.tif` | High-quality document format | \u2b50\u2b50\u2b50\u2b50\u2b50 |\n| **BMP** | `.bmp` | Windows bitmap format | \u2b50\u2b50\u2b50\u2b50 |\n| **GIF** | `.gif` | Animated/static images | \u2b50\u2b50\u2b50 |\n| **WebP** | `.webp` | Modern web format | \u2b50\u2b50\u2b50\u2b50 |\n| **PDF** | `.pdf` | Document format (image-based) | \u2b50\u2b50\u2b50\u2b50\u2b50 |\n\n### \ud83d\udce4 **Output Formats**\n- **Plain Text** (`.txt`) - Clean, formatted text\n- **Rich Text** (`.rtf`) - Formatted text with styling\n- **Microsoft Word** (`.docx`) - Professional documents\n- **PDF** (`.pdf`) - Searchable PDF with OCR layer\n- **JSON** (`.json`) - Structured data with metadata\n- **CSV** (`.csv`) - Tabular data extraction\n\n---\n\n## \u2699\ufe0f **Configuration**\n\n### \ud83d\udd27 **OCR Engine Settings**\n\n#### Tesseract Configuration\n```python\n# tesseract_config.json\n{\n    \"engine\": \"tesseract\",\n    \"language\": \"eng+fra+deu\",  # Multiple languages\n    \"oem\": 3,                   # OCR Engine Mode (0-3)\n    \"psm\": 6,                   # Page Segmentation Mode (0-13)\n    \"dpi\": 300,                 # Target DPI for processing\n    \"preprocessing\": {\n        \"denoise\": true,\n        \"contrast_enhance\": true,\n        \"rotation_correction\": true\n    }\n}\n```\n\n#### EasyOCR Configuration\n```python\n# easyocr_config.json\n{\n    \"engine\": \"easyocr\",\n    \"languages\": [\"en\", \"fr\", \"de\"],\n    \"gpu\": false,               # Use GPU acceleration\n    \"batch_size\": 1,\n    \"workers\": 0,               # Number of worker threads\n    \"confidence_threshold\": 0.5\n}\n```\n\n### \ud83c\udf9b\ufe0f **Application Settings**\n\n#### GUI Configuration\n```python\n# gui_settings.json\n{\n    \"theme\": \"modern\",          # UI theme\n    \"auto_preview\": true,       # Show preview automatically\n    \"batch_size\": 10,          # Max files per batch\n    \"output_directory\": \"./output\",\n    \"cache_duration\": 24,       # Hours to keep cache\n    \"language_detection\": true,\n    \"progress_notifications\": true\n}\n```\n\n#### Processing Settings\n```python\n# processing_config.json\n{\n    \"max_threads\": 4,           # Parallel processing threads\n    \"memory_limit\": \"2GB\",      # Maximum memory usage\n    \"timeout\": 300,             # Processing timeout (seconds)\n    \"retry_attempts\": 3,        # Retry failed operations\n    \"temp_directory\": \"./temp\",\n    \"log_level\": \"INFO\"         # DEBUG, INFO, WARNING, ERROR\n}\n```\n\n### \ud83c\udf0d **Language Configuration**\n\n#### Available Languages\n```bash\n# Install additional Tesseract language packs\nsudo apt-get install tesseract-ocr-[LANG]\n\n# Common language codes:\n# eng (English), fra (French), deu (German), spa (Spanish)\n# chi_sim (Chinese Simplified), jpn (Japanese), ara (Arabic)\n# rus (Russian), kor (Korean), hin (Hindi), por (Portuguese)\n```\n\n#### Language Detection Settings\n```python\n# language_config.json\n{\n    \"auto_detect\": true,\n    \"fallback_language\": \"eng\",\n    \"confidence_threshold\": 0.8,\n    \"supported_languages\": [\n        \"eng\", \"fra\", \"deu\", \"spa\", \"ita\", \"por\",\n        \"rus\", \"chi_sim\", \"jpn\", \"kor\", \"ara\", \"hin\"\n    ]\n}\n```\n\n---\n\n## \ud83d\udcd6 **Usage**\n\n### \ud83d\udda5\ufe0f **GUI Application**\n\n1. **Launch the application**:\n   ```bash\n   python universal_document_converter_ocr.py\n   ```\n\n2. **Basic OCR Process**:\n   - Drag and drop files into the application window\n   - Select OCR engine (Tesseract/EasyOCR/Auto)\n   - Choose output format and destination\n   - Click \"Start OCR\" to begin processing\n\n3. **Batch Processing**:\n   - Select multiple files using Ctrl+Click\n   - Configure batch settings in the Settings panel\n   - Monitor progress in real-time\n   - Review results in the output directory\n\n### \ud83d\udcbb **Command Line Interface (CLI)**\n\nThe OCR Document Converter includes a powerful CLI for automation and integration.\n\n#### Basic Usage\n```bash\n# Single file OCR\npython cli.py document.jpg -o result.txt -t txt --ocr\n\n# Convert without OCR\npython cli.py document.pdf -o document.md -t md\n\n# Batch processing\npython cli.py *.jpg -o converted/ -t txt --ocr\n\n# Specify OCR language\npython cli.py scan.png -o text.txt --ocr --language fra\n```\n\n#### VFP9/VB6 Integration via CLI\n```bash\n# For VFP9/VB6 users - simple command line execution\npython cli.py input.md -o output.rtf -t rtf --quiet\n```\n\n#### Advanced Options\n```bash\n# Full command with all options\npython ocr_engine/ocr_engine.py \\\n    --input document.pdf \\\n    --output result.docx \\\n    --engine easyocr \\\n    --language en,fr,de \\\n    --confidence 0.7 \\\n    --preprocessing \\\n    --format docx \\\n    --dpi 300\n```\n\n#### Command Line Arguments\n| Argument | Description | Example |\n|----------|-------------|----------|\n| `--input` | Input file/pattern | `document.jpg`, `\"*.png\"` |\n| `--output` | Output file | `result.txt` |\n| `--output-dir` | Output directory | `./results/` |\n| `--engine` | OCR engine | `tesseract`, `easyocr`, `auto` |\n| `--language` | Language codes | `eng`, `eng+fra`, `en,fr,de` |\n| `--confidence` | Confidence threshold | `0.5` to `1.0` |\n| `--format` | Output format | `txt`, `docx`, `pdf`, `json` |\n| `--dpi` | Target DPI | `150`, `300`, `600` |\n| `--preprocessing` | Enable preprocessing | Flag (no value) |\n| `--batch-size` | Batch processing size | `5`, `10`, `20` |\n| `--threads` | Number of threads | `1`, `4`, `8` |\n\n### \ud83d\udd27 **Python API**\n\n#### Basic OCR\n```python\nfrom ocr_engine import OCREngine\n\n# Initialize OCR engine\nocr = OCREngine(engine='tesseract', language='eng')\n\n# Process single file\nresult = ocr.extract_text('document.jpg')\nprint(result.text)\n\n# Save to file\nocr.save_result(result, 'output.txt', format='txt')\n```\n\n#### Advanced Usage\n```python\nfrom ocr_engine import OCREngine, OCRConfig\n\n# Custom configuration\nconfig = OCRConfig(\n    engine='easyocr',\n    languages=['en', 'fr'],\n    confidence_threshold=0.8,\n    preprocessing=True,\n    dpi=300\n)\n\n# Initialize with config\nocr = OCREngine(config=config)\n\n# Batch processing\nfiles = ['doc1.jpg', 'doc2.png', 'doc3.pdf']\nresults = ocr.process_batch(files)\n\nfor file, result in results.items():\n    print(f\"{file}: {result.confidence:.2f}\")\n    ocr.save_result(result, f\"{file}.txt\")\n```\n\n#### Error Handling\n```python\nfrom ocr_engine import OCREngine, OCRError\n\ntry:\n    ocr = OCREngine()\n    result = ocr.extract_text('document.jpg')\n    \n    if result.confidence < 0.5:\n        print(\"Warning: Low confidence OCR result\")\n    \nexcept OCRError as e:\n    print(f\"OCR Error: {e}\")\nexcept FileNotFoundError:\n    print(\"Input file not found\")\nexcept Exception as e:\n    print(f\"Unexpected error: {e}\")\n```\n\n---\n\n## \ud83d\udcc1 **Project Structure**\n\n```\nocr_document_converter/\n\u251c\u2500\u2500 \ud83d\udcc1 ocr_engine/                    # Core OCR engine modules\n\u2502   \u251c\u2500\u2500 __init__.py                   # Package initialization\n\u2502   \u251c\u2500\u2500 ocr_engine.py                 # Main OCR engine class\n\u2502   \u251c\u2500\u2500 ocr_engine_minimal.py         # Lightweight OCR implementation\n\u2502   \u251c\u2500\u2500 image_processor.py            # Image preprocessing utilities\n\u2502   \u251c\u2500\u2500 format_detector.py            # File format detection\n\u2502   \u2514\u2500\u2500 ocr_integration.py            # Integration layer\n\u2502\n\u251c\u2500\u2500 \ud83d\udcc1 gui/                           # GUI components\n\u2502   \u251c\u2500\u2500 universal_document_converter_ocr.py      # Main GUI application\n\u2502   \u251c\u2500\u2500 universal_document_converter_enhanced.py # Enhanced GUI features\n\u2502   \u2514\u2500\u2500 ocr_gui_integration.py        # GUI-OCR integration\n\u2502\n\u251c\u2500\u2500 \ud83d\udcc1 tests/                         # Test suite\n\u2502   \u251c\u2500\u2500 test_ocr_integration.py       # Integration tests\n\u2502   \u251c\u2500\u2500 validate_ocr_integration.py   # Validation scripts\n\u2502   \u2514\u2500\u2500 test_data/                    # Sample test files\n\u2502       \u251c\u2500\u2500 sample_document.jpg\n\u2502       \u251c\u2500\u2500 multi_language.png\n\u2502       \u2514\u2500\u2500 low_quality.pdf\n\u2502\n\u251c\u2500\u2500 \ud83d\udcc1 config/                        # Configuration files\n\u2502   \u251c\u2500\u2500 tesseract_config.json         # Tesseract settings\n\u2502   \u251c\u2500\u2500 easyocr_config.json          # EasyOCR settings\n\u2502   \u251c\u2500\u2500 gui_settings.json            # GUI preferences\n\u2502   \u2514\u2500\u2500 language_config.json         # Language settings\n\u2502\n\u251c\u2500\u2500 \ud83d\udcc1 output/                        # Default output directory\n\u251c\u2500\u2500 \ud83d\udcc1 temp/                          # Temporary processing files\n\u251c\u2500\u2500 \ud83d\udcc1 cache/                         # OCR result cache\n\u251c\u2500\u2500 \ud83d\udcc1 logs/                          # Application logs\n\u2502\n\u251c\u2500\u2500 \ud83d\udcc4 requirements.txt               # Python dependencies\n\u251c\u2500\u2500 \ud83d\udcc4 setup_ocr_environment.py       # Automated setup script\n\u251c\u2500\u2500 \ud83d\udcc4 README.md                      # This comprehensive guide\n\u251c\u2500\u2500 \ud83d\udcc4 OCR_README.md                  # Technical OCR documentation\n\u251c\u2500\u2500 \ud83d\udcc4 OCR_INTEGRATION_COMPLETE.md    # Integration completion notes\n\u251c\u2500\u2500 \ud83d\udcc4 .gitignore                     # Git ignore rules\n\u2514\u2500\u2500 \ud83d\udcc4 LICENSE                        # MIT License\n```\n\n### \ud83d\udccb **Key Files Description**\n\n| File | Purpose | Key Features |\n|------|---------|-------------|\n| `ocr_engine/ocr_engine.py` | Main OCR processing | Dual engine support, batch processing |\n| `universal_document_converter_ocr.py` | GUI application | Drag-drop, settings panel, progress tracking |\n| `setup_ocr_environment.py` | Automated installer | Dependencies, Tesseract, language packs |\n| `test_ocr_integration.py` | Comprehensive tests | Unit tests, integration tests, benchmarks |\n| `validate_ocr_integration.py` | Validation suite | System validation, performance tests |\n| `requirements.txt` | Dependencies | All Python packages with versions |\n\n---\n\n## \ud83e\uddea **Testing & Validation**\n\n### \ud83d\udd2c **Run Test Suite**\n\n```bash\n# Run all tests\npython test_ocr_integration.py\n\n# Run validation suite\npython validate_ocr_integration.py\n\n# Run specific test categories\npython test_ocr_integration.py --category unit\npython test_ocr_integration.py --category integration\npython test_ocr_integration.py --category performance\n```\n\n### \ud83d\udcca **Test Coverage**\n\n- **Unit Tests**: 45+ individual component tests\n- **Integration Tests**: End-to-end OCR workflows\n- **Performance Tests**: Speed and memory benchmarks\n- **Language Tests**: Multi-language OCR accuracy\n- **Format Tests**: All supported input/output formats\n- **Error Handling**: Exception and edge case testing\n\n### \ud83c\udfaf **Benchmarks**\n\n| Test Category | Files Tested | Success Rate | Avg. Processing Time |\n|---------------|--------------|--------------|---------------------|\n| **English Text** | 100+ | 98.5% | 2.3s per page |\n| **Multi-Language** | 50+ | 95.2% | 3.1s per page |\n| **Low Quality** | 30+ | 87.8% | 4.2s per page |\n| **Batch Processing** | 500+ | 97.1% | 1.8s per page |\n\n---\n\n## \ud83d\udce5 **Download Options**\n\n### 1\ufe0f\u20e3 **Complete Application Package** (Recommended)\n**File**: `Universal-Document-Converter-v3.1.0-Windows-Complete.zip` (59 KB)\n\nContains EVERYTHING including:\n- \u2705 Full GUI application with OCR\n- \u2705 CLI interface (`cli.py`)\n- \u2705 OCR engines (Tesseract & EasyOCR support)\n- \u2705 VFP9/VB6 integration (DLL package included)\n- \u2705 All documentation\n- \u2705 Automated installer\n\n```bash\n# Download from GitHub Releases\nhttps://github.com/Beaulewis1977/quick_ocr_doc_converter/releases/latest/download/Universal-Document-Converter-v2.1.0-Windows-Complete.zip\n```\n\n### 2\ufe0f\u20e3 **32-bit DLL Package** (VFP9/VB6 Only)\n**File**: `UniversalConverter32.dll.zip` (12 KB)\n\nFor users who ONLY need VFP9/VB6 integration:\n- \ud83d\udce6 Lightweight download\n- \ud83d\udcc1 DLL wrapper files\n- \ud83d\udcdd VFP9/VB6 example code\n- \ud83d\udcda Integration documentation\n- \ud83d\udd27 Batch DLL simulator\n\n```bash\n# Download DLL package only\nhttps://github.com/Beaulewis1977/quick_ocr_doc_converter/releases/latest/download/UniversalConverter32.dll.zip\n```\n\n## \ud83d\udee0\ufe0f **Installation Methods**\n\n### \ud83d\ude80 **Method 1: From Complete Package**\n\n1. **Download** the complete package\n2. **Extract** to any folder\n3. **Run** `install.bat` as Administrator\n4. **Launch** using desktop shortcut or `run_ocr_converter.bat`\n\n### \ud83d\ude80 **Method 2: From Source (Development)**\n\n```bash\n# Clone and setup in one command\ngit clone https://github.com/Beaulewis1977/quick_ocr_document_converter.git\ncd quick_ocr_document_converter\npython setup_ocr_environment.py\n```\n\n### \ud83d\udd27 **Method 2: Manual Installation**\n\n#### Step 1: Python Environment\n```bash\n# Create virtual environment (recommended)\npython -m venv ocr_env\nsource ocr_env/bin/activate  # Linux/Mac\n# or\nocr_env\\Scripts\\activate     # Windows\n\n# Install Python dependencies\npip install -r requirements.txt\n```\n\n#### Step 2: Tesseract OCR\n\n**Windows:**\n```bash\n# Download and install from:\n# https://github.com/UB-Mannheim/tesseract/wiki\n# Add to PATH: C:\\Program Files\\Tesseract-OCR\n```\n\n**macOS:**\n```bash\n# Using Homebrew\nbrew install tesseract\n\n# Install language packs\nbrew install tesseract-lang\n```\n\n**Linux (Ubuntu/Debian):**\n```bash\n# Install Tesseract\nsudo apt-get update\nsudo apt-get install tesseract-ocr\n\n# Install language packs\nsudo apt-get install tesseract-ocr-eng tesseract-ocr-fra tesseract-ocr-deu\n```\n\n**Linux (CentOS/RHEL):**\n```bash\n# Install Tesseract\nsudo yum install epel-release\nsudo yum install tesseract tesseract-langpack-eng\n```\n\n#### Step 3: EasyOCR Dependencies\n```bash\n# Install PyTorch (CPU version)\npip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu\n\n# For GPU support (optional)\npip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\n```\n\n### \ud83d\udc33 **Method 3: Docker Installation**\n\n```dockerfile\n# Dockerfile\nFROM python:3.9-slim\n\n# Install system dependencies\nRUN apt-get update && apt-get install -y \\\n    tesseract-ocr \\\n    tesseract-ocr-eng \\\n    tesseract-ocr-fra \\\n    tesseract-ocr-deu \\\n    libgl1-mesa-glx \\\n    libglib2.0-0\n\n# Copy application\nCOPY . /app\nWORKDIR /app\n\n# Install Python dependencies\nRUN pip install -r requirements.txt\n\n# Run application\nCMD [\"python\", \"universal_document_converter_ocr.py\"]\n```\n\n```bash\n# Build and run Docker container\ndocker build -t ocr-converter .\ndocker run -p 8080:8080 -v $(pwd)/output:/app/output ocr-converter\n```\n\n---\n\n## \ud83d\udd27 **Troubleshooting**\n\n### \u2757 **Common Issues**\n\n#### Tesseract Not Found\n```bash\n# Error: TesseractNotFoundError\n# Solution: Add Tesseract to PATH\nexport PATH=$PATH:/usr/local/bin/tesseract  # Linux/Mac\n# or add C:\\Program Files\\Tesseract-OCR to Windows PATH\n```\n\n#### Low OCR Accuracy\n```python\n# Try different preprocessing options\nconfig = {\n    \"preprocessing\": {\n        \"denoise\": True,\n        \"contrast_enhance\": True,\n        \"rotation_correction\": True,\n        \"dpi_optimization\": True\n    }\n}\n```\n\n#### Memory Issues\n```python\n# Reduce batch size and enable memory optimization\nconfig = {\n    \"batch_size\": 1,\n    \"memory_limit\": \"1GB\",\n    \"enable_gc\": True\n}\n```\n\n#### Language Detection Issues\n```python\n# Specify languages explicitly\nconfig = {\n    \"language\": \"eng+fra+deu\",  # Multiple languages\n    \"auto_detect\": False\n}\n```\n\n### \ud83d\udccb **Debug Mode**\n\n```bash\n# Enable debug logging\nexport OCR_DEBUG=1\npython universal_document_converter_ocr.py --debug\n\n# Check log files\ntail -f logs/ocr_debug.log\n```\n\n### \ud83c\udd98 **Getting Help**\n\n1. **Check the logs**: `logs/ocr_application.log`\n2. **Run validation**: `python validate_ocr_integration.py`\n3. **Test with sample files**: Use files in `tests/test_data/`\n4. **Create an issue**: [GitHub Issues](https://github.com/Beaulewis1977/quick_ocr_document_converter/issues)\n\n---\n\n## \ud83e\udd1d **Contributing**\n\n### \ud83c\udf1f **How to Contribute**\n\n1. **Fork the repository**\n2. **Create a feature branch**: `git checkout -b feature/amazing-feature`\n3. **Make your changes** and add tests\n4. **Run the test suite**: `python test_ocr_integration.py`\n5. **Commit your changes**: `git commit -m 'Add amazing feature'`\n6. **Push to the branch**: `git push origin feature/amazing-feature`\n7. **Open a Pull Request**\n\n### \ud83c\udfaf **Areas for Contribution**\n\n- **New OCR Engines**: Add support for additional OCR backends\n- **Language Support**: Add new language models and detection\n- **Image Processing**: Improve preprocessing algorithms\n- **GUI Enhancements**: Add new features to the user interface\n- **Performance**: Optimize processing speed and memory usage\n- **Documentation**: Improve guides and API documentation\n- **Testing**: Add more test cases and benchmarks\n\n### \ud83d\udcdd **Development Setup**\n\n```bash\n# Clone your fork\ngit clone https://github.com/YOUR_USERNAME/quick_ocr_document_converter.git\ncd quick_ocr_document_converter\n\n# Create development environment\npython -m venv dev_env\nsource dev_env/bin/activate\n\n# Install development dependencies\npip install -r requirements.txt\npip install -r requirements-dev.txt\n\n# Run tests\npython -m pytest tests/\n\n# Run linting\nflake8 ocr_engine/\nblack ocr_engine/\n```\n\n### \ud83c\udff7\ufe0f **Code Style**\n\n- Follow **PEP 8** Python style guidelines\n- Use **Black** for code formatting\n- Add **docstrings** to all functions and classes\n- Write **comprehensive tests** for new features\n- Update **documentation** for any changes\n\n---\n\n## \ud83d\udcc4 **License**\n\nThis project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## \ud83d\ude4f **Acknowledgments**\n\n- **Tesseract OCR** - Google's open-source OCR engine\n- **EasyOCR** - JaidedAI's neural network OCR\n- **OpenCV** - Computer vision library for image processing\n- **PyTorch** - Machine learning framework for EasyOCR\n- **Tkinter** - Python's standard GUI toolkit\n\n---\n\n## \ud83e\udd1d **Support Open Source**\n\nBuilding and maintaining OCR Document Converter takes time and resources. While the tool is completely free, \nyour voluntary support helps ensure continued development and improvements.\n\nIf this tool has saved you time or added value to your work, consider showing your appreciation:\n\n**Venmo**: @BeauinTulsa  \n**Ko-fi**: https://ko-fi.com/beaulewis\n\nTogether, we're making document conversion accessible to everyone. Thank you! \ud83d\udcaa\n\n---\n\n## \ud83d\udcde **Support**\n\n- **Documentation**: [OCR_README.md](OCR_README.md)\n- **Issues**: [GitHub Issues](https://github.com/Beaulewis1977/quick_ocr_document_converter/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/Beaulewis1977/quick_ocr_document_converter/discussions)\n- **Email**: [Create an issue for support](https://github.com/Beaulewis1977/quick_ocr_document_converter/issues/new)\n\n---\n\n<div align=\"center\">\n\n**Made with \u2764\ufe0f for the OCR community**\n\n\u2b50 **Star this repository if it helped you!** \u2b50\n\n</div>\n\n### \ud83d\udce6 **Create Standalone Executable (No Python Required)**\n\n1. **Double-click** `create_executable.py`\n2. **Wait for compilation** (creates a single .exe file)\n3. **Share the .exe** - works on any Windows computer without Python!\n\n### \u26a1 **Manual Launch (Advanced Users)**\n\n```bash\npython universal_document_converter.py\n```\n\n---\n\n## \u2728 **Features**\n\n### \ud83d\ude80 **Core Conversion Features**\n- **\ud83d\udcc4 Universal Format Support**: Convert between 6 input and 5 output formats (30 combinations)\n- **\u26a1 Lightning Fast**: Multi-threaded processing with intelligent caching\n- **\ud83d\uddb1\ufe0f Drag & Drop**: Intuitive interface with enhanced file/folder drag-and-drop\n- **\ud83d\udcc1 Batch Processing**: Convert entire folders recursively with progress tracking\n- **\ud83c\udfaf Smart Detection**: Automatic file format detection with fallback support\n- **\ud83d\udd27 Zero APIs**: Works completely offline without external dependencies\n\n### \u2699\ufe0f **Enterprise Configuration Management**\n- **\ud83d\udee0\ufe0f Advanced Settings**: Comprehensive configuration system with GUI settings panel\n- **\ud83d\udcbe Settings Persistence**: Automatic saving of user preferences and window positions\n- **\ud83d\udccb Profile Management**: Multiple configuration profiles for different use cases\n- **\ud83d\udd04 Import/Export**: Share configurations between installations\n- **\u26a1 CLI Configuration**: Full command-line configuration support with profiles\n\n### \ud83c\udfd7\ufe0f **Performance & Reliability**\n- **\ud83d\ude80 Multi-Threading**: 2-4x performance improvement with configurable worker threads\n- **\ud83e\udde0 Intelligent Caching**: Prevents redundant conversions of unchanged files\n- **\ud83d\udcca Memory Optimization**: 50-80% memory reduction for large files through streaming\n- **\ud83d\udcc8 Real-time Progress**: Visual progress tracking with detailed conversion results\n- **\ud83d\udd0d Professional Logging**: Enterprise-grade logging system with file rotation\n\n### \ud83c\udf0d **Cross-Platform Excellence**\n- **\ud83d\udda5\ufe0f Native Windows Integration**: Start Menu shortcuts, taskbar pinning, registry file associations\n- **\ud83d\udc27 Linux Desktop Integration**: .desktop files, MIME types, applications menu, file manager integration\n- **\ud83c\udf4e macOS App Bundle**: Native .app bundles, Dock integration, Finder associations, Spotlight search\n- **\ud83d\udce6 Universal Packaging**: .deb, .rpm, AppImage, .dmg, .pkg, and .msi installers\n- **\ud83d\udd27 Platform Detection**: Automatic platform-specific paths and configurations\n\n### \ud83c\udfa8 **User Experience**\n- **\ud83d\udda5\ufe0f Modern GUI**: Clean, responsive interface with tabbed settings\n- **\ud83d\udd17 Desktop Integration**: Native shortcuts and file associations on all platforms\n- **\ud83d\udcd6 File Opening**: Built-in file opening with default applications\n- **\ud83c\udfaf Drag & Drop**: Enhanced file and folder drag-and-drop support\n- **\ud83d\udd12 Privacy First**: All processing happens locally on your machine\n\n---\n\n## \ud83d\udcc4 **Supported Formats**\n\n| **Input Formats (6)** | **Output Formats (5)** |\n|----------------------|------------------------|\n| **DOCX** - Microsoft Word Documents | **Markdown** - GitHub-flavored markdown |\n| **PDF** - Portable Document Format | **TXT** - Plain text with formatting |\n| **TXT** - Plain text files | **HTML** - Clean, semantic HTML |\n| **HTML** - Web pages and documents | **RTF** - Rich Text Format |\n| **RTF** - Rich Text Format | **EPUB** - Electronic Publication (eBooks) |\n| **EPUB** - Electronic Publication (eBooks) | |\n\n**Total Conversion Combinations: 30** *(6 \u00d7 5)*\n\n### \ud83d\udcda **EPUB Support Features**\n- **\ud83d\udcd6 Full EPUB Reading**: Extracts text\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Enterprise-grade OCR and document conversion tool with dual OCR engines",
    "version": "3.1.0",
    "project_urls": {
        "Documentation": "https://github.com/Beaulewis1977/quick_ocr_doc_converter/blob/main/OCR_README.md",
        "Homepage": "https://github.com/Beaulewis1977/quick_ocr_doc_converter",
        "Issues": "https://github.com/Beaulewis1977/quick_ocr_doc_converter/issues",
        "Repository": "https://github.com/Beaulewis1977/quick_ocr_doc_converter"
    },
    "split_keywords": [
        "ocr",
        " document",
        " conversion",
        " pdf",
        " tesseract",
        " easyocr"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0e9827ef0552531447d282e97516b83f57f194cfa5572c06078e3dc7deaadffc",
                "md5": "fa4ef8a89328db807769fa0991411e14",
                "sha256": "aa21cf5fcae94dfae6f89dc3671462eabf09e24a9b8c6a0941b0591c18da9c1d"
            },
            "downloads": -1,
            "filename": "ocr_document_converter-3.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fa4ef8a89328db807769fa0991411e14",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 44716,
            "upload_time": "2025-07-22T15:19:01",
            "upload_time_iso_8601": "2025-07-22T15:19:01.643666Z",
            "url": "https://files.pythonhosted.org/packages/0e/98/27ef0552531447d282e97516b83f57f194cfa5572c06078e3dc7deaadffc/ocr_document_converter-3.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "64b6c9f9e5daab72bbc25107a9a6437448d6280487479aca712d3c772be1afaa",
                "md5": "4ad37a8621804f8e4f05f062d93239b3",
                "sha256": "879d8d72a52fca248f73d73f0b695269a52da36058ad20ec1453eeae283b3fac"
            },
            "downloads": -1,
            "filename": "ocr_document_converter-3.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4ad37a8621804f8e4f05f062d93239b3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 86618,
            "upload_time": "2025-07-22T15:19:03",
            "upload_time_iso_8601": "2025-07-22T15:19:03.178773Z",
            "url": "https://files.pythonhosted.org/packages/64/b6/c9f9e5daab72bbc25107a9a6437448d6280487479aca712d3c772be1afaa/ocr_document_converter-3.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-22 15:19:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Beaulewis1977",
    "github_project": "quick_ocr_doc_converter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pytesseract",
            "specs": [
                [
                    ">=",
                    "0.3.10"
                ]
            ]
        },
        {
            "name": "Pillow",
            "specs": [
                [
                    ">=",
                    "9.0.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.21.0"
                ]
            ]
        },
        {
            "name": "opencv-python",
            "specs": [
                [
                    ">=",
                    "4.5.0"
                ]
            ]
        },
        {
            "name": "easyocr",
            "specs": [
                [
                    ">=",
                    "1.6.0"
                ]
            ]
        },
        {
            "name": "python-docx",
            "specs": [
                [
                    ">=",
                    "0.8.11"
                ]
            ]
        },
        {
            "name": "docx2txt",
            "specs": [
                [
                    ">=",
                    "0.8"
                ]
            ]
        },
        {
            "name": "reportlab",
            "specs": [
                [
                    ">=",
                    "3.6.0"
                ]
            ]
        },
        {
            "name": "weasyprint",
            "specs": [
                [
                    ">=",
                    "56.0"
                ]
            ]
        },
        {
            "name": "markdown",
            "specs": [
                [
                    ">=",
                    "3.4.0"
                ]
            ]
        },
        {
            "name": "beautifulsoup4",
            "specs": [
                [
                    ">=",
                    "4.11.0"
                ]
            ]
        },
        {
            "name": "tkinterdnd2",
            "specs": [
                [
                    ">=",
                    "0.3.0"
                ]
            ]
        },
        {
            "name": "psutil",
            "specs": [
                [
                    ">=",
                    "5.9.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    ">=",
                    "4.0.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    ">=",
                    "22.0.0"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    ">=",
                    "5.0.0"
                ]
            ]
        },
        {
            "name": "lxml",
            "specs": [
                [
                    ">=",
                    "4.9.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.28.0"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    ">=",
                    "4.64.0"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    ">=",
                    "0.4.5"
                ]
            ]
        }
    ],
    "lcname": "ocr-document-converter"
}
        
Elapsed time: 1.10270s