VisionOCR
Convert your scanned PDFs into editable Word documents with 99 %+ accuracy — formatting preservation, smart cache and support for 60+ languages thanks to Google Cloud Vision API.
Discuss a similar projectRéponse courte
VisionOCR is a Python CLI tool built to turn scanned PDFs into Word documents (.docx) faithful to the original. Through a 4-step pipeline powered by Google Cloud Vision API, it detects text with over 99% accuracy, analyzes formatting (fonts, alignments, spacing) and rebuilds a Word document that preserves the original layout. A smart SHA-256 cache with a 30-day TTL eliminates redundant API calls, bringing the cost of reprocessing down to zero.
Context & Challenges
Why traditional PDF-to-Word conversion solutions fall short
Converting scanned documents into editable files remains a major challenge for companies and professionals. Traditional OCR tools offer insufficient accuracy, lose the original formatting and bill every API call with no caching mechanism — a costly, imprecise and time-consuming process.
Limited OCR accuracy
Traditional OCR tools offer 85-90% accuracy, insufficient for professional, old or low-resolution scanned documents.
Systematic formatting loss
Fonts, alignments, text sizes and spacing are rarely preserved during conversion, requiring time-consuming manual re-layout.
Insufficient multilingual support
Most tools only handle a few languages correctly, limiting their use in an international or multilingual context.
Uncontrolled API costs
Every call to a cloud OCR service costs money, and without a built-in caching mechanism, reprocessing needlessly multiplies the bill.
Functional scope
Scanned documents: books, invoices, administrative files, technical manuals. Multi-page processing with selection by range or list. Support for 60+ languages with automatic detection. Configurable resolution from 300 to 600+ DPI.
Key constraints
Target OCR accuracy > 99% on any type of document · Faithful formatting preservation (fonts, styles, alignments) · Controlled costs via a smart cache with a 30-day TTL · Cross-platform compatibility: Linux, macOS, Windows.
Objectives & Scope
Three strategic axes for professional-grade PDF-to-Word conversion
Strategic objective
Democratize professional OCR: make superior-quality PDF-to-Word conversion accessible through a simple, open-source and extensible CLI tool.
Operational objective
Automate the full pipeline — from raw PDF to formatted Word document — with batch processing and a smart cache.
Technical objective
Control Google Cloud Vision API costs through a persistent SHA-256 disk cache and automatic compression of images > 20 MB.
Tech Stack
The technologies and libraries at the heart of VisionOCR
OCR & Vision
PDF processing
Word generation
Analysis & ML
CLI & Configuration
Performance & Cache
Differentiating pattern — Smart SHA-256 cache: unlike traditional OCR tools that bill every processing run, VisionOCR uses a SHA-256 hash of each image's content to create a unique cache key. OCR results are stored locally via diskcache with a 30-day TTL, eliminating redundant API calls. The result: reprocessing cost drops to zero, and processing time for already-analyzed documents is instant.
Architecture Diagrams
An overview of the application and the OCR processing pipeline
Results, Gains & ROI
Measured gains in document conversion and processing
| Indicator | Traditional OCR | With VisionOCR | Gain |
|---|---|---|---|
| OCR accuracy | 85-90% | 99%+ | +10 to +15 points |
| Formatting preservation | None or partial | Fonts, alignments, spacing | Faithful formatting |
| Language support | 5-10 languages | 60+ languages with auto detection | ×6 to ×12 |
| Reprocessing cost | Same as first processing | $0 (SHA-256 cache) | −100% |
| Interface | Complex GUI | Simple, scriptable CLI | Automatable |
| Time per page | Variable, often > 10 s | 2-3 s (300 DPI) | ~×4 faster |
Qualitative gains
Open Source
Free code under MIT license. Extensible, auditable, community-driven.
Cross-platform
Compatible with Linux, macOS and Windows. Automatic installation scripts.
Smart cache
Cuts API costs by 100% on reprocessing thanks to the SHA-256 hash.
Faithful formatting
Preserves the fonts, styles, alignments and spacing of the original document.
Scriptable CLI
Integrates into any automated pipeline. Native batch processing.
Advanced logging
Loguru with rotation, verbosity levels (-v, -vv, -vvv) and API statistics.