cqbase.net · English & Chinese

CQBase

Context & Query Base

Workflows

Docling

Prepares complex documents for generative AI, under MIT.

docling-project/docling is MIT licensed. It turns complex documents, such as PDFs, into a structure that generative models can use more reliably. It is a preprocessing step, not a chat product.

Use it when an agent must cite a long document and you want headings and tables to survive. Try one file you have the right to process, then run a batch. The output is still the original work. Do not republish it.

Mentioned by:

  • @0x_rody mentioned this project on 14 November 2026 (26 likes and 0 reposts, captured 15 November 2026).

This page is a guide, not the original text.

What problem it solves

docling-project/docling is MIT licensed. It parses complex files — PDFs, Office documents, HTML, email, and more — into a structure that generative models can use more reliably. The shared DoclingDocument can be exported as Markdown, HTML, JSON, and other formats, with headings, reading order, and tables kept in view. It is a preprocessing step, not a chat product.

The project started with the team at IBM Research Zurich and is now hosted at the LF AI & Data Foundation. The Docling Technical Report describes the design. The codebase is MIT, but individual models have their own licenses. Official docs ask you to read the licenses in the original model packages.

Who it is for

It is for people who need an agent to cite a long document and want headings and tables to survive. You can convert files on your machine with the CLI or the Python library, or follow the docs to connect Docling through MCP, the docling-serve API, and frameworks such as LangChain and LlamaIndex. Sensitive files can stay on a local path. You do not have to upload them to a third-party chat product first.

Try one file you have the right to process, then run a batch. The output is still the original work. Do not republish it as your own. The first run often downloads models and needs disk and memory, so it is a poor surprise to spring on a shared machine.

How to install it

Verified on 2026-11-16 (Asia/Shanghai). The commands come from the repository README and the official Installation page. On that day, PyPI listed docling 2.150.1, with requires-python set to >=3.10,<4.0. The README states that Python 3.9 support was dropped in version 2.70.0. The most recent repository push was at 14:11 Asia/Shanghai on 15 November 2026. The repository is not archived.

The default install is:

pip install docling

If you use uv, the official command is uv add docling. On CPU-only Linux, the docs suggest adding the PyTorch CPU index, for example:

pip install docling --extra-index-url https://download.pytorch.org/whl/cpu

Intel macOS machines may hit newer PyTorch builds that no longer ship x86_64 wheels. For pip, official docs offer pip install "docling[mac_intel]" and note that PyTorch 2.2.2 needs Python 3.12 or lower. Follow that page rather than mixing torch builds without checking.

Scanned pages, audio, video, and visual language models are not all in the default package. Official extras are opt-in, for example pip install "docling[easyocr]", docling[vlm], or docling[asr]. OCR engines, system Tesseract packages, and TESSDATA_PREFIX are documented on the same Installation page. This guide does not treat those extras as required for every user.

Command line

The official quickstart converts a public paper into Markdown in the current directory:

docling https://arxiv.org/pdf/2408.09869

Python library

from docling.document_converter import DocumentConverter

source = "https://arxiv.org/pdf/2408.09869"
converter = DocumentConverter()
result = converter.convert(source)
print(result.document.export_to_markdown())

MCP (optional)

To expose conversion to an MCP client, official docs start the server from docling-mcp:

{
  "mcpServers": {
    "docling": {
      "command": "uvx",
      "args": ["--from=docling-mcp", "docling-mcp-server"]
    }
  }
}

Conversion is local by default. To send work to a deployed docling-serve instance, set DOCLING_SERVICE_URL and the other variables on the MCP page. This page did not run that MCP path.

A worked example

This example uses the official technical-report PDF as a structure check. The URL comes from the official README. Confirm that you can reach arXiv, and treat the output as reading material only. The conversion was not run here, so this page does not invent the result.

  1. In Python 3.10 or newer, run pip install docling.
  2. Save the following script, for example as try_docling.py:
from docling.document_converter import DocumentConverter

source = "https://arxiv.org/pdf/2408.09869"
converter = DocumentConverter()
result = converter.convert(source)
text = result.document.export_to_markdown()
print(len(text))
print(text.splitlines()[0] if text else "empty")
  1. Run python try_docling.py. The expected effect is a first run that may download models and take a while, then a non-zero character count and a first-line title. Open the original PDF and check the headings, sections, and a small table yourself. Do not republish the export.
  2. For a local file, point source at a path you have the right to process. If a scan loses layout, enable the OCR extra the official docs describe for your engine. Do not assume the default install already includes the engine you picked.

Common pitfalls

  • Installing the current stable release on Python 3.9. Official docs dropped 3.9 in 2.70.0. Use 3.10 or newer.
  • Treating the codebase MIT license as a license for every model weight. The README's License section tells you to check the original packages.
  • Running the first conversion in a place with no disk or no network. Models have to download. A failure there is not proof that the file format is unsupported.
  • Expecting complete text from a scanned PDF without installing or configuring OCR. Automatic engine selection will not pick Tesseract. If you only have the Tesseract CLI, official docs say you must choose that engine explicitly.
  • Using a too-new PyTorch on an Intel Mac, or installing both opencv-python and opencv-python-headless. The Installation page documents those issues.
  • Republishing the converted text as a new work. It is still the original document.

FAQ

Which formats does Docling support?

On this review date, the README listed inputs such as PDF, DOCX, PPTX, XLSX, HTML, EPUB, Apple Pages / Numbers / Keynote, many image types, LaTeX, email, calendars, audio, and some video containers. Exports include Markdown, HTML, and JSON. The living list is supported formats, and it can grow with a release.

Do I have to install OCR extras?

No. Born-digital PDFs often work with the default pipeline. Scans and images are the cases that need OCR. Follow the Installation page for engines and system packages, and install extras only when you need them.

Can I call it through MCP?

Yes. Official docs show uvx --from=docling-mcp docling-mcp-server. Conversion is local by default, or you can point it at a remote docling-serve instance. Details are on the MCP page.

The codebase is MIT. Can I redistribute the models freely?

Do not assume that. The code is MIT. Official docs say individual models have their own licenses. Read those terms before commercial use or redistribution.

How is this different from MarkItDown?

Both can turn files into Markdown, but they are aimed at different jobs. Docling emphasizes layout, reading order, and tables, and it ships local model pipelines. This catalog also has a MarkItDown entry. Which one you want depends on whether you need a lighter conversion or a fuller document structure. This page did not run a comparison benchmark.

Sources and license

The docling-project/docling codebase is MIT licensed. Model licenses must be checked separately. This page is a paraphrase, for CQBase — Context & Query Base, of the README, the installation guide, the MCP page, and the PyPI page, checked on 16 November 2026. If extras, the Python requirement, or supported formats change, the official docs win.

Subscribe to CQBase Weekly

One email a week with newly catalogued public AI skills, prompts, MCP servers, and methods. Unsubscribe at any time. We will not hand your address to a third party for their marketing.