Docling converts documents into a structured representation you can export as Markdown or JSON. Use it when headings, tables and document provenance matter to an ingestion pipeline. Start with a small Word or HTML file before adding PDF models or OCR; those introduce different dependencies and acceptance checks.
Install and choose a working environment
Tool version 2.150.1. Documentation checked 2026-11-16. The upstream source snapshot and installed package are pinned separately; the snapshot is not claimed to be the package’s release commit.
Create a project virtual environment first (python -m venv .venv), activate it using your shell’s normal procedure, and run the install command in that environment. The recorded Python tests used Linux/Python 3.12; other operating systems were not locally validated.
python -m pip install "docling==2.150.1"
docling --help
docling report.docx --to md
This package is a CLI/Python library, not an MCP server configured by the install command above. Run the examples in the project’s environment and give the resulting files to your assistant.
- Claude Code: open the project, ask it to inspect the saved script/output, and confirm the interpreter path before execution.
- Codex: open the same workspace, provide the script/output filename, and ask for a review or a locally permitted run.
- Cursor: choose the project’s Python interpreter, run the command in its terminal, then attach the resulting file in chat.
These are file/terminal workflows, not a claim of a vendor-specific integration. The three client interfaces were not tested locally.
Three practical uses
1. Convert a Word report
docling report.docx --to md
Expected: Expect a Markdown file; compare its paragraphs and column labels with the original.
2. Export structured document data
from docling.document_converter import DocumentConverter
result = DocumentConverter().convert("report.docx")
print(result.document.export_to_dict())
Expected: Inspect the document and table structure in the returned dictionary.
3. Summarize with traceable evidence
Ask your agent: Read report.md exported by Docling. List three decisions with a supporting quote and section for each. Mark unsupported claims as unknown.
Expected: a response that follows the stated scope and exposes the requested source or tool result. Verify those references before acting.
What our tests established
The existing isolated run used docling-slim 2.150.1 for DOCX and HTML. Each produced one three-row, two-column table with column labels and both records retained. PDF, OCR and model provisioning were not tested. The full-distribution PDF workflow is documentation-based.
Tests were run by Codex on synthetic data; no claim of the owner personally testing or reviewing this guide. Examples added above are documentation-based unless included in that recorded scope.
Common errors and fixes
First PDF conversion stalls
Confirm a Word conversion first, then provision the PDF models following the installation guide.
Missing format dependency
The recorded slim test covers DOCX/HTML extras. Install the full docling distribution for the PDF path shown above.
Table or OCR text is wrong
Check columns against the source and configure OCR for scanned pages. A generated file is not an accuracy check.
Limits, costs and license
The code is MIT licensed; model licenses are separate. Local conversion consumes your own compute and storage. External model services have their own charges. Validate complex layouts and OCR on your documents.
When to choose an alternative
-
For simpler document-to-text conversion:MarkItDown。
-
For a PDF-focused Python workflow:PyMuPDF4LLM。
FAQ
Does Docling support OCR?
Yes, but this page tests DOCX/HTML only. Provision the OCR dependencies and check your language and layouts.
Where should I install Docling from?
Use the official docling PyPI package and the linked repository instructions.
Is Docling an IBM tool?
It originated at IBM Research. Follow the current Docling project documentation and license for usage.
Official sources
If you only need readable text, compare MarkItDown's conversion workflow. For PDF-focused work, also inspect output using PyMuPDF4LLM's minimal example. For Word and HTML differences, read the same-file comparison of Docling and MarkItDown.