Docling: Streamlining Document Processing for Generative AI

Docling: Streamlining Document Processing for Generative AI

Summary

Docling is a powerful Python library designed to simplify document processing and prepare diverse formats for generative AI applications. It excels at parsing various document types, including advanced PDF understanding, and offers seamless integrations with popular AI frameworks. With Docling, developers can efficiently extract, transform, and utilize document content for their AI models.

Repository Info

Updated on March 22, 2026
View on GitHub

Introduction

Docling is an open-source Python library from the docling-project that revolutionizes how documents are prepared for generative AI. It provides robust capabilities for parsing and understanding a wide array of document formats, from standard PDFs and Office files to HTML, Markdown, and even audio. Docling aims to simplify the complex task of extracting structured information from unstructured and semi-structured documents, making it readily consumable by AI models and applications. Its advanced features include sophisticated PDF layout analysis, table structure recognition, and support for various export formats, ensuring data integrity and usability.

Installation

Getting started with Docling is straightforward. You can install it using pip:

pip install docling

Please note that Docling requires Python 3.10 or higher. It is compatible with macOS, Linux, and Windows environments, supporting both x86_64 and arm64 architectures. For more detailed instructions, refer to the official documentation.

Examples

Docling offers both a Python API and a convenient command-line interface (CLI) for document conversion.

Python API Example:
To convert individual documents programmatically:

from docling.document_converter import DocumentConverter

source = "https://arxiv.org/pdf/2408.09869"  # document per local path or URL
converter = DocumentConverter()
result = converter.convert(source)
print(result.document.export_to_markdown())  # output: "## Docling Technical Report[...]"

CLI Example:
You can also convert documents directly from your terminal:

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

Docling CLI also supports Visual Language Models (VLMs) like GraniteDocling:

docling --pipeline vlm --vlm-model granite_docling https://arxiv.org/pdf/2206.01062

Explore more usage examples and advanced options in the documentation.

Why Use Docling

Docling stands out for its comprehensive approach to document processing for AI. Its ability to parse a multitude of formats, including advanced PDF understanding with layout, reading order, and table structure, makes it incredibly versatile. The unified DoclingDocument representation simplifies data handling, while various export options, including Markdown and lossless JSON, provide flexibility. Furthermore, Docling offers plug-and-play integrations with popular AI frameworks like LangChain, LlamaIndex, and Haystack, accelerating agentic AI development. Its local execution capabilities ensure data privacy and security, making it suitable for sensitive environments.

Links