docling
Convert documents to Markdown, JSON, HTML, or text
TLDR
Convert a file to Markdown in the current directory
$ docling [path/to/file.pdf]
Write the result to a directory$ docling [path/to/file.pdf] --output [path/to/directory]
Export images as placeholders or as referenced PNG files$ docling --image-export-mode [placeholder|referenced] [path/to/file.pdf]
Choose the output format$ docling --to [json|html|md|text] [path/to/file.pdf]
Skip OCR on a digital PDF$ docling --no-ocr [path/to/file.pdf]
Use a vision-language model$ docling --vlm-model granite_docling [https://arxiv.org/pdf/2206.01062]
Show help$ docling -h
SYNOPSIS
docling [OPTIONS] SOURCE...
DESCRIPTION
docling converts PDF, Office, HTML, and image inputs into Markdown or another structured form. It uses layout analysis and, unless --no-ocr is set, OCR. A source can be a local path or a URL.The package needs Python 3.10 or newer. Release 2.70.0 dropped Python 3.9. The command is the console script of the docling Python package. The CLI also exposes further subcommands; docling --help lists them.Optional pieces such as a VLM model are selected with flags. They are not separate programs.
PARAMETERS
--output DIRECTORY
Write converted files under this directory instead of the current directory.--image-export-mode MODE
placeholder replaces figures with placeholders. referenced writes PNG files and links them from the output.--to FORMAT
Output format: json, html, md, or text.--no-ocr
Do not run OCR. Faster on PDFs that already contain text.--vlm-model NAME
Select a vision-language model. One name the project documents is the token in the example above.-h, --help
Show help and exit.
INSTALL
yay -S docling
nix profile install nixpkgs#docling
CAVEATS
Conversion downloads models on first use and can be heavy on CPU. A URL source fetches that document with the privileges of the process.
SEE ALSO
pandoc(1), markitdown(1), python3(1)
