New🔬 Community guide for IBM's open-source DoclingOCR — free document AI for everyone.
⭐ Star on GitHub
DoclingOCRv2026
Developer Documentation

Docling Python Quickstart & CLI Tutorial

Step-by-step developer tutorial for installing IBM's Docling, running local batch conversions, enabling CUDA GPU acceleration, and exporting to clean Markdown.

Don't Want to Code?

Use the Official Web GUI on SheetParser

Convert any document instantly in your browser with zero installation on SheetParser.com.

Open Web GUI

1. System Requirements & Installation

Docling requires Python 3.10 or higher. We recommend creating a clean virtual environment:

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install basic package
pip install docling

# Or install with full OCR engine support
pip install "docling[ocr]"

2. Command Line Interface (CLI) Usage

Once installed, you can convert local files or remote URLs directly from your terminal:

# Convert a local PDF
docling sample_paper.pdf

# Convert an online arXiv paper directly
docling https://arxiv.org/pdf/2408.09869

# Export directly to custom output directory
docling sample.pdf --output ./dist --to md

3. Python Script Example

Here is how to integrate DocumentConverter in your Python backend:

from pathlib import Path
from docling.document_converter import DocumentConverter

# Initialize converter
converter = DocumentConverter()

# Convert PDF or image
source = Path("financial_statement.pdf")
conversion_result = converter.convert(source)

# Export to clean Markdown
markdown_output = conversion_result.document.export_to_markdown()

# Save output
with open("output.md", "w", encoding="utf-8") as f:
    f.write(markdown_output)

print("Conversion complete!")

4. Common Issues & Pitfalls

Issue: Out of Memory (OOM) on Large PDFs

Processing 50+ page PDFs locally can consume 8GB+ of RAM. If running in a memory-constrained container, consider processing in page chunks or using SheetParser's cloud queue.

Issue: Missing OpenCV System Dependencies

On Debian/Ubuntu, you may encounter ImportError: libGL.so.1: cannot open shared object file. Fix with: sudo apt-get install ffmpeg libsm6 libxext6.

Open source · Free to use · Community-driven

DoclingOCR — Open-Source Document Intelligence

Don't spend hours fighting with Python dependencies, PyTorch CUDA drivers, or downloading 4GB models. Use SheetParser — the dedicated online Web UI powered by Docling & TableFormer.

No Credit Card Required100% Free Daily CreditsInstant Browser Conversion