<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Pdf-Extraction on ToolGenix — Open-Source AI &amp; Developer Tools: Honest Hands-On Reviews</title>
    <link>https://toolgenix.nxtniche.com/tags/pdf-extraction/</link>
    <description>Recent content in Pdf-Extraction on ToolGenix — Open-Source AI &amp; Developer Tools: Honest Hands-On Reviews</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 03 Aug 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://toolgenix.nxtniche.com/tags/pdf-extraction/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>pdf-inspector: Stop Sending Every PDF Through OCR</title>
      <link>https://toolgenix.nxtniche.com/posts/article-2026-08-03-qr/</link>
      <pubDate>Mon, 03 Aug 2026 00:00:00 +0000</pubDate>
      <guid>https://toolgenix.nxtniche.com/posts/article-2026-08-03-qr/</guid>
      <description>pdf-inspector is a Rust PDF classifier that spots scanned vs text PDFs in milliseconds and extracts clean Markdown locally, no OCR. 6.6k stars. I tested it.</description>
      <content:encoded><![CDATA[<p>Ever watched your RAG pipeline burn $3 and 9 seconds on OCR for a PDF that was never scanned in the first place? Yeah, me too. Every PDF hits the OCR service by default because nobody knows what&rsquo;s actually inside until it&rsquo;s too late. So when Firecrawl shipped pdf-inspector — a Rust classifier that tells you in ~10ms whether a PDF even needs OCR — it hit Trending for a reason. 6,633 stars and climbing fast.</p>
<h2 id="what-pdf-inspector-actually-does">What pdf-inspector actually does</h2>
<p>The short version: it&rsquo;s a two-stage tool built in pure Rust (MIT, single <code>lopdf</code> dependency, zero ML models). First it classifies — TextBased, Scanned, ImageBased, or Mixed — by sampling content streams for text operators. Then, if it&rsquo;s text-based, it extracts position-aware text and converts it to clean Markdown locally. The whole point is the ~54% of PDFs that don&rsquo;t need OCR get handled in under 200ms instead of being shipped off to a slow, paid service.</p>
<p>What sold me is the routing logic. It returns a per-page list of pages that genuinely need OCR, not a blanket yes/no. So a 40-page report where page 17 is a scan doesn&rsquo;t get dumped wholesale into OCR — only page 17 does. That&rsquo;s the kind of granularity most &ldquo;PDF parsers&rdquo; don&rsquo;t bother with. And that&rsquo;s the difference between a tool and a routing decision. It&rsquo;s the exact thing your <a href="/posts/cognee-ai-memory-quick-review/">knowledge-graph memory layer</a> depends on — garbage text in means garbage retrieval out.</p>
<h2 id="my-hands-on-test">My hands-on test</h2>
<p>I installed it via pip in about 30 seconds (<code>pip install pdf-inspector</code>, prebuilt wheel, 2.6MB — no compiling, no Rust toolchain needed). Then I threw three real documents at it on my workstation.</p>
<p>Here&rsquo;s what came back:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Document</th>
					<th style="text-align: center">Detected type</th>
					<th style="text-align: center">Confidence</th>
					<th style="text-align: center">Detect time</th>
					<th style="text-align: center">Full process</th>
					<th style="text-align: center">Markdown out</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left">Hermes kanban spec (spec doc)</td>
					<td style="text-align: center">text_based</td>
					<td style="text-align: center">1.0</td>
					<td style="text-align: center">14.6ms</td>
					<td style="text-align: center">116.9ms</td>
					<td style="text-align: center">54,891 chars</td>
			</tr>
			<tr>
					<td style="text-align: left">COLM 2025 conference paper</td>
					<td style="text-align: center">text_based</td>
					<td style="text-align: center">1.0</td>
					<td style="text-align: center">2.0ms</td>
					<td style="text-align: center">15.0ms</td>
					<td style="text-align: center">10,687 chars</td>
			</tr>
			<tr>
					<td style="text-align: left">ICLR 2026 conference paper</td>
					<td style="text-align: center">text_based</td>
					<td style="text-align: center">1.0</td>
					<td style="text-align: center">3.0ms</td>
					<td style="text-align: center">25.2ms</td>
					<td style="text-align: center">14,686 chars</td>
			</tr>
			<tr>
					<td style="text-align: left">Image-only 2-page PDF (my test)</td>
					<td style="text-align: center">scanned</td>
					<td style="text-align: center">0.95</td>
					<td style="text-align: center">2.0ms</td>
					<td style="text-align: center">—</td>
					<td style="text-align: center">pages 0,1 → OCR</td>
			</tr>
	</tbody>
</table>
<p>The conference papers came out clean — headings mapped to H1/H2, italics preserved, page numbers stripped, even the &ldquo;Under review&rdquo; lines handled. Then I built a fake scanned document (image XObjects, no text stream). It correctly flagged it <code>scanned</code> at 0.95 confidence and handed back <code>[0, 1]</code> as pages needing OCR. In 2 milliseconds. That&rsquo;s the exact behavior the README promises, and it held up on my machine.</p>
<h2 id="where-the-benchmarks-land">Where the benchmarks land</h2>
<p>They benchmarked it on the opendataloader corpus (200 PDFs, no OCR, local engines only). pdf-inspector scored 0.875 overall — top of the field, and it finished all 200 docs in 0.470s. The table structure score (0.814) is the standout. PyMuPDF4LLM, the usual go-to, scored 0.735 overall and took 17 seconds. For a local Rust tool that&rsquo;s a real gap, not a rounding error. Yet the honest caveat is these are their own published numbers, so treat them as direction, not gospel.</p>
<h2 id="what-to-watch-out-for">What to watch out for</h2>
<p>It&rsquo;s not magic. Classification reads the content stream, so a PDF that rasterized text into curves or images gets sent to OCR — that&rsquo;s by design, but don&rsquo;t expect it to rescue bad exports. The Markdown is built for structure, and while the table detection is good, complex multi-page financial tables still need a human glance. And the CLI (<code>pdf2md</code>) is solid, but for heavy production use you&rsquo;ll want the Python or Node bindings, which are the actively maintained path.</p>
<h2 id="bottom-line">Bottom line</h2>
<p>If you&rsquo;re routing PDFs through OCR out of habit, pdf-inspector is worth the 30 seconds to test. It&rsquo;s fast, it&rsquo;s local, and it makes a genuinely smart decision about whether your expensive OCR step is even needed. The Rust core with Python/Node/WASM bindings means it slots into almost any stack. I&rsquo;m folding it into my ingestion pipeline — right alongside <a href="/posts/openviking-context-database-review/">a context database that cuts agent tokens</a> — and honestly, the per-page OCR routing alone justifies the look.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
