
pdf-inspector 3 步上手Rust 本地 PDF 类型识别与 Markdown 提取指南【免费下载链接】pdf-inspectorFast Rust library for PDF inspection, classification, and text extraction. Intelligently detects scanned vs text-based PDFs to enable smart routing decisions.项目地址: https://gitcode.com/GitHub_Trending/pdf/pdf-inspector你手里有一批 PDF不知道哪些能直接抽文字、哪些必须走 OCRpdf-inspector 用纯 Rust 在本地完成 PDF 类型识别与 Markdown 提取文本型文档 200ms 内出结果逐页给出置信度帮你决定哪页送去 OCR、哪页直接本地处理。⚡ 能力速览三个数字定去留完整处理检测 提取 转 Markdown文本型 PDF 本地耗时 200ms类型识别仅需 10–50ms在 200 份文档的基准上综合得分 0.875表格 TEDS 0.814一套 Rust 内核提供 Python / Node.js / WebAssembly 三种绑定 三步跑通第一个 PDF 类型识别与提取Step 1 · 装好它。终端执行pip install pdf-inspector预编译 wheel 覆盖 Linux、macOS、WindowsNode.js 与 Wasm 绑定则分别用 npm 安装细节见各自 README。Step 2 · 最小调用。整个流程就一行核心 APIimport pdf_inspector result pdf_inspector.process_pdf(document.pdf) print(result.pdf_type) # text_based / scanned / image_based / mixed print(result.markdown) # Markdown 字符串或 NoneStep 3 · 看懂输出。pdf_type告诉你这份 PDF 属于哪一类confidence是 0–1 的置信度markdown是转换后的正文提取失败时为 Nonepages_needing_ocr列出需要走 OCR 的页码方便你只对这些页做重处理。 换个姿势用如果你只是想快速判断类型、不抽内容调用detect_pdf()十几毫秒返回类型、置信度和需 OCR 页码。如果你要精确到坐标的文本做高亮、批注、引用extract_text_with_positions()给出每个文本项的 X/Y、字号与字体名只想看某几页时用process_pdf()的pages参数切片。想深入 API 细节和基准方法论直接翻官方文档 → Python 完整 API → 性能基准测试 → Node.js 绑定参考【免费下载链接】pdf-inspectorFast Rust library for PDF inspection, classification, and text extraction. Intelligently detects scanned vs text-based PDFs to enable smart routing decisions.项目地址: https://gitcode.com/GitHub_Trending/pdf/pdf-inspector创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考