Loading...
Loading...
Read, classify, and convert PDF files to Markdown locally in ~10-200ms using Firecrawl's pdf-inspector Rust library — no OCR service, no network, no ML models. Use whenever a task involves reading, extracting, summarizing, or converting a PDF file. Classifies text-based vs scanned first, so scanned pages get routed to OCR instead of silently coming back empty.
npx skill4agent add kuberwastaken/pdf-inspector pdf-inspectorlopdf~/.venvs/pdf-inspector$PDF_INSPECTOR_VENVpdf-inspectorpython3 scripts/pdfmd.py document.pdf # Markdown on stdout, status on stderr
python3 scripts/pdfmd.py document.pdf --detect # classification only (fast), JSON output
python3 scripts/pdfmd.py document.pdf --json # full result (markdown + metadata) as JSON
python3 scripts/pdfmd.py document.pdf --text # plain text, no Markdown structure
python3 scripts/pdfmd.py document.pdf --pages 1,3,5-10 # only these pages (1-indexed; not with --text)021pdf_typetext_basedscannedimage_basedmixedconfidencepages_needing_ocrhas_encoding_issuestruepages_with_tablespages_with_columnspdf_typescannedimage_basedpages_needing_ocrmixed--detect--pageshas_encoding_issues~/.venvs/pdf-inspector/bin/pythonimport pdf_inspector
r = pdf_inspector.process_pdf("doc.pdf", pages=[1, 3]) # full result; pages= is 1-indexed
c = pdf_inspector.classify_pdf("doc.pdf") # lightweight; pages_needing_ocr is 0-indexed here
items = pdf_inspector.extract_text_with_positions("doc.pdf") # TextItem: text, x, y, font, page, bold/italic
per_page = pdf_inspector.extract_pages_markdown("doc.pdf", pages=[0, 2]) # 0-indexed pages arg
regions = pdf_inspector.extract_text_in_regions("doc.pdf", [(0, [[50, 50, 400, 200]])])process_pdf(pages=)extract_pages_markdown(pages=)classify_pdfpages_needing_ocrpages_with_tablescargo install pdf-inspectorpdf2mddetect-pdf@firecrawl/pdf-inspector