Skip to content

v0.6.1 — Truly Lazy OCR Loading for Instant Digital PDF Conversion

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Nov 07:16
· 1 commit to main since this release

What's New in v0.6.1

Performance & UX Improvements

  • Truly Lazy OCR Engine Detection: Replaced eager import paddleocr / import pytesseract inside detect_ocr_engine("auto") with lightweight importlib.util.find_spec(...) checks — avoiding heavy PaddlePaddle / PaddleX / OpenCV imports and startup latency until OCR is actually needed.
  • Deferred OCR Resolution in convert_pdf: Pure digital PDFs in --ocr auto mode now extract text and tables immediately without touching PaddleOCR or pypdfium2, recording ocr_engine: "not_needed" in metadata.
  • Now on PyPI: Install directly via pip install document-to-markdown (https://pypi.org/project/document-to-markdown/).

Quick Install

# Base install (PDF, DOCX, PPTX, Excel, EML, HTML, CSV/TSV)
pip install document-to-markdown

# Recommended: add PaddleOCR + PP-Structure layout/table analysis
pip install "document-to-markdown[ocr]"

# Optional Outlook .msg support (BSD olefile) or all extras
pip install "document-to-markdown[outlook]"
pip install "document-to-markdown[all]"

Quick Usage

# Instant native PDF / Office conversion (PaddleOCR only loads if a scanned page is detected)
document-to-markdown report.pdf --mode ai

# Fast CPU OCR mode for scanned PDFs and images
document-to-markdown scan.pdf --mode ai --ocr-profile mobile

Prebuilt Assets

Download standalone executables for Windows (x64 .exe), Linux (x64), and macOS (arm64), or install the .whl / .tar.gz packages attached below.