{"slug": "trulyfreeocr-a-java-ocr-pipeline-in-a-single-fat-jar-zero-native-deps-required", "title": "TrulyFreeOCR – a Java OCR pipeline in a single fat JAR, zero native deps required", "summary": "A developer released TrulyFreeOCR, an open-source Java OCR pipeline that converts scanned PDFs into searchable, compressed PDFs using a single fat JAR with zero native dependencies. The tool runs offline on CPU, uses business-friendly licenses (Apache 2.0/MIT/BSD), and achieves 5-10x file size reduction via MRC compression. It is designed for enterprise deployment where admin rights are unavailable and cloud APIs are prohibited.", "body_md": "I'm the author of TrulyFreeOCR, an open-source OCR pipeline that turns scanned PDFs into searchable, highly-compressed PDFs. Everything is Apache 2.0 / MIT / BSD — no GPL, no AGPL, no proprietary model weights.\n\nI needed an OCR pipeline for a document processing system where:\n\nEvery dependency had to be business-friendly (no GPL/AGPL)\n\nDeployment required zero admin rights (no sudo, no brew, no apt-get)\n\nMRC compression was needed to hit 5-10x file size reduction vs JPEG-only\n\nEverything had to run offline on CPU — no cloud APIs, no GPU\n\nI surveyed [20+ existing tools](https://github.com/msmarkgu/TrulyFreeOCR/blob/main/docs/opensource-ocr-tools.md) (full comparison in the repo's docs) and none fit all requirements. OCRmyPDF is closest but needs Python + Ghostscript + Tesseract as system deps, and MPL-2.0 requires publishing modifications. The VLM models (DeepSeek-OCR, GLM-OCR, etc.) produce better text extraction but need GPUs and don't output PDFs at all.\n\nInput: any PDF (scanned, born-digital, or mixed)\n\nOutput: searchable PDF with invisible text layer + MRC compression (JBIG2/CCITT foreground + JPEG background)\n\nSingle fat JAR — one file to copy, one command to run\n\nBootstrap script downloads everything (JDK, Gradle, Tesseract, Leptonica, jbig2enc) into project subdirs\n\nFully offline, CPU-only\n\nPDF/A-2b output available\n\n7 bundled language models, 100+ more downloadable\n\nConcurrent OCR (configurable thread pool)\n\n``` bash\n$ git clone https://github.com/msmarkgu/TrulyFreeOCR.git\n$ cd TrulyFreeOCR\n$ ./bootstrap.sh ./run.sh tests/simple-text.pdf -o output.pdf\n```\n\nTesseract-based accuracy — good for clean scans, not SOTA for noisy/photographed docs\n\nNo table/formula extraction yet\n\nNo handwriting recognition\n\nCPU-only is slower than GPU backends for high volume\n\nWould love feedback — especially from anyone who's tried to deploy OCR in an enterprise environment.", "url": "https://wpnews.pro/news/trulyfreeocr-a-java-ocr-pipeline-in-a-single-fat-jar-zero-native-deps-required", "canonical_source": "https://dev.to/mark_front_d509d304a2f460/trulyfreeocr-a-java-ocr-pipeline-in-a-single-fat-jar-zero-native-deps-required-27k2", "published_at": "2026-07-12 00:45:42+00:00", "updated_at": "2026-07-12 01:14:04.393837+00:00", "lang": "en", "topics": ["developer-tools", "machine-learning", "computer-vision"], "entities": ["TrulyFreeOCR", "OCRmyPDF", "Tesseract", "Leptonica", "jbig2enc", "DeepSeek-OCR", "GLM-OCR", "Apache 2.0"], "alternates": {"html": "https://wpnews.pro/news/trulyfreeocr-a-java-ocr-pipeline-in-a-single-fat-jar-zero-native-deps-required", "markdown": "https://wpnews.pro/news/trulyfreeocr-a-java-ocr-pipeline-in-a-single-fat-jar-zero-native-deps-required.md", "text": "https://wpnews.pro/news/trulyfreeocr-a-java-ocr-pipeline-in-a-single-fat-jar-zero-native-deps-required.txt", "jsonld": "https://wpnews.pro/news/trulyfreeocr-a-java-ocr-pipeline-in-a-single-fat-jar-zero-native-deps-required.jsonld"}}