Start here
- Install Docling in a separate Python environment.
- Convert a local file and write the Markdown result.
- Compare the output with a few known source values.
Downloads
Install in a separate environment
Use Docling’s current installation guide for the supported Python version and platform. Keep this environment separate from an unrelated application. The first conversion may download model assets; local input does not mean a fresh installation can run without any network setup.
python -m venv .venv
# Activate the environment using your platform’s command.
python -m pip install doclingSave a Markdown file
The official quickstart exposes DocumentConverter and export_to_markdown. This adapted example takes sample.pdf from the current folder and writes output.md. Use an output directory that does not contain your only copy of the source.
from pathlib import Path
from docling.document_converter import DocumentConverter
source = Path("sample.pdf")
result = DocumentConverter().convert(source)
Path("output.md").write_text(
result.document.export_to_markdown(), encoding="utf-8"
)This is a documentation-based example, not a measured conversion benchmark. Check the installed version before adapting it to a batch job.
Use a small known input
The downloadable fixture has a heading, a three-row product table, and codes with leading zeros. Open the HTML fixture and print it to PDF as sample.pdf. Compare your output to the human-written reference Markdown. The reference describes the intended content; it is not output generated or verified by Docling.
| Field | Expected check |
|---|---|
| SKU 00123 | Leading zeros remain |
| Unit price 12.50 | Decimal value remains correct |
| Pack quantity 6 | Does not become part of the unit price |
| Paragraph after the table | Appears after the table in reading order |
Handle scans and images separately
A PDF can contain text, page images, or both. OCR settings and the environment affect a scan conversion. Also check how images are exported before assuming the Markdown file is a self-contained archive. Keep images alongside the text when downstream readers need them.
Record a useful result
Write down package version, input type, failed cells, and runtime on your own machine. Review continued tables and multi-column pages before expanding to a folder. If you only need a few text-based tables, the Tabula comparison may lead to a simpler workflow.
Sources
Updated October 30, 2026. Based on the linked documentation; the tools have not been benchmarked by NarrowTools. Editorial policy
