<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mark Front</title>
    <description>The latest articles on DEV Community by Mark Front (@mark_front_d509d304a2f460).</description>
    <link>https://dev.to/mark_front_d509d304a2f460</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4025638%2F6c6de1d4-3948-44e9-9671-74afe014ee3c.jpg</url>
      <title>DEV Community: Mark Front</title>
      <link>https://dev.to/mark_front_d509d304a2f460</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mark_front_d509d304a2f460"/>
    <language>en</language>
    <item>
      <title>TrulyFreeOCR – a Java OCR pipeline in a single fat JAR, zero native deps required</title>
      <dc:creator>Mark Front</dc:creator>
      <pubDate>Sun, 12 Jul 2026 00:45:42 +0000</pubDate>
      <link>https://dev.to/mark_front_d509d304a2f460/trulyfreeocr-a-java-ocr-pipeline-in-a-single-fat-jar-zero-native-deps-required-27k2</link>
      <guid>https://dev.to/mark_front_d509d304a2f460/trulyfreeocr-a-java-ocr-pipeline-in-a-single-fat-jar-zero-native-deps-required-27k2</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built it:
&lt;/h2&gt;

&lt;p&gt;I needed an OCR pipeline for a document processing system where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Every dependency had to be business-friendly (no GPL/AGPL)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deployment required zero admin rights (no sudo, no brew, no apt-get)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MRC compression was needed to hit 5-10x file size reduction vs JPEG-only&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Everything had to run offline on CPU — no cloud APIs, no GPU&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I surveyed &lt;a href="https://github.com/msmarkgu/TrulyFreeOCR/blob/main/docs/opensource-ocr-tools.md" rel="noopener noreferrer"&gt;20+ existing tools&lt;/a&gt; (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.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Input: any PDF (scanned, born-digital, or mixed)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Output: searchable PDF with invisible text layer + MRC compression (JBIG2/CCITT foreground + JPEG background)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Single fat JAR — one file to copy, one command to run&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bootstrap script downloads everything (JDK, Gradle, Tesseract, Leptonica, jbig2enc) into project subdirs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fully offline, CPU-only&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PDF/A-2b output available&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;7 bundled language models, 100+ more downloadable&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Concurrent OCR (configurable thread pool)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it in 3 commands:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git clone https://github.com/msmarkgu/TrulyFreeOCR.git
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;TrulyFreeOCR
&lt;span class="nv"&gt;$ &lt;/span&gt;./bootstrap.sh ./run.sh tests/simple-text.pdf &lt;span class="nt"&gt;-o&lt;/span&gt; output.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Limitations (being upfront):
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tesseract-based accuracy — good for clean scans, not SOTA for noisy/photographed docs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No table/formula extraction yet&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No handwriting recognition&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CPU-only is slower than GPU backends for high volume&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Would love feedback — especially from anyone who's tried to deploy OCR in an enterprise environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/msmarkgu/TrulyFreeOCR" rel="noopener noreferrer"&gt;https://github.com/msmarkgu/TrulyFreeOCR&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>ocr</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
