# Firecrawl 開源 pdf-inspector：純 Rust 本機解析引擎，PDF 不經 OCR 直接轉成結構化 Markdown

> 📖 本站完整內容索引（documentation index）：[llms.txt](/llms.txt)

> 原作者：Firecrawl (@firecrawl) · 策展與摘要：EasyVibeCoding · 平台：X (Twitter) · 熱度：🔥🔥🔥🔥 · 日期：2026-08-03

> 原始來源：https://x.com/firecrawl/status/2083759818133688517

## 證據與延伸閱讀

- [Firecrawl 開源 pdf-inspector：純 Rust 本機解析引擎，PDF 不經 OCR 直接轉成結構化 Markdown](https://github.com/firecrawl/pdf-inspector) — 官方 Repository

## 中文摘要

Firecrawl 開源 pdf-inspector：純 Rust 本機解析引擎，PDF 不經 OCR 直接轉成結構化 Markdown。

**核心發布** Firecrawl 表示，`pdf-inspector` 與自家 OCR 模型一起驅動 `/parse`，每頁處理速度可達 0.002 秒；Nicolas Camara 指出，分類 PDF 約需 20ms、200 份 PDF 可在 2.8 秒完成，並能在本機擷取高品質表格與圖表內容。Firecrawl 說明，約 54% 的 PDF 並不需要 OCR，這類純文字 PDF 在本機可於 200 毫秒內處理完成。專案由 Firecrawl 開源（[github.com/firecrawl/pdf-inspector](https://github.com/firecrawl/pdf-inspector)），採 MIT 授權；Nicolas Camara 另發文致謝 @abimaelmartell 主導開發。

**技術能力** `pdf-inspector` 可辨識 `TextBased`、`Scanned`、`ImageBased` 與 `Mixed` PDF，回傳信心分數及需要 OCR 的頁碼；它支援文字位置、字型資訊、多欄閱讀順序、RTL 文字、CID 字型與編碼問題偵測，並能將標題、清單、程式碼區塊、表格、粗體／斜體、超連結與分頁轉成 Markdown。整體採純 Rust、無 ML model、無外部服務，文件只解析一次，也可透過 Python、Node.js、瀏覽器 WebAssembly 與 Rust 使用。

**效能與定位** 在 2026 年 7 月 31 日、Apple M4 Pro 上的 200 份 PDF `opendataloader-bench` 測試中（該測試只列入不使用模型解析的本機引擎，且關閉 OCR），`pdf-inspector` 整體分數 0.875、閱讀順序 0.915、表格 0.814，完整執行速度 0.470 秒；相較 `LiteParse` 的 0.750 秒、`OpenDataLoader` 的 2.569 秒與 `PyMuPDF4LLM` 的 17.117 秒，整體、閱讀順序、表格與速度表現均具優勢，但標題分數 0.788 低於 `LiteParse` 的 0.811。其最適合原生文字 PDF，例如研究報告、論文、財務文件、發票與法律文件。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/27793729572f463d.jpg)
> Firecrawl 的發布圖：一份美國專利 PDF 正被 pdf-inspector 解析成 Markdown，圖上標示 Parsing 進行中

**CLI 使用** 來源提供以下完整指令：

```bash
cargo install pdf-inspector
pdf2md document.pdf
pdf2md document.pdf --json
pdf2md document.pdf --items-json
pdf2md document.pdf --raw
pdf2md document.pdf --compact
pdf2md document.pdf --pages
pdf2md document.pdf --select-pages 1,3,5-10
detect-pdf document.pdf
detect-pdf document.pdf --json
detect-pdf document.pdf --analyze --json
```

其中 `--compact` 可降低 token 使用量，`--pages` 插入頁碼標記，`--select-pages` 僅處理指定頁面；從原始碼建置時則使用 `cargo run --bin pdf2md -- document.pdf` 或 `cargo run --bin detect-pdf -- document.pdf`。

## 標籤

開源專案, 爬蟲, Firecrawl
