Docling Config Generator

Choose your options to generate an executable CLI command and an equivalent Python snippet. Flags follow the current docling convert syntax — verify against the official documentation.

  1. 1ConfigureChoose your options
  2. 2Preview & copyCLI + Python snippet
  3. 3Run locallyPaste or download the script
Input

PDF unlocks the OCR and table options below; other formats use their own backend automatically.

OCR & tables
Enable OCR Engine

Disabling OCR speeds up digital PDFs — keep it on for scans and photos.

Enrichment
Enrich Code Blocks
Enrich LaTeX Formulas
Extract Chart Data

Each option adds a model pass — enable only what your document contains.

Output & performance

Auto selects CUDA → MPS → CPU; tune threads to your machine.

CLI Command

bash

              

Python Equivalent

python

              

Verified with Docling v2.129.0 · Last checked 2026-09-22 · Official source

1
Start here

How to use the generator

The Config Generator turns your selections into a copy-ready docling convert command and an equivalent Python snippet. This guide explains what every option does, how the generated flags map to the Python API, and how to run the result safely.

Work top to bottom; the preview refreshes as you change any control.

  1. Choose the input format that matches your file. It only changes input handling for PDFs; other formats use their own backend.
  2. Decide on OCR. Leave it on for scans and photos, and turn it off for digital PDFs to make conversion much faster.
  3. Pick an OCR engine and mode if OCR is on. Start with auto and choose a specific engine only when you need it.
  4. Select the table mode. Use accurate for complex tables and fast when speed matters more than precision.
  5. Enable only the enrichment you need. Code, formulas and charts each add neural post-processing.
  6. Choose the output format and accelerator. Markdown for reading, JSON for structure; pick a GPU only if you have one.
  7. Copy, or download the script. Use Copy CLI, Copy Python or Download Script (.sh).
  8. Run it and check the output. The converted file is written next to your source by default.
2
Input

Input format

Pick the closest match. Only PDF and image inputs are affected by the OCR and table options; the rest flow through their format-specific backend automatically.

InputExtensionsOCR appliesNotes
PDF.pdfYes (optional)Layout, reading order and tables - the main use case for this tool.
Word.docx, .docNoHeadings, lists and tables are preserved.
PowerPoint.pptxNoSlides, text boxes and speaker notes.
Excel.xlsxNoEach sheet becomes a structured table.
HTML.html, .htmNoWeb pages and saved HTML.
Audio.mp3, .wavNoUses the ASR pipeline; OCR options do not apply.
3
OCR

OCR options

OCR (optical character recognition) converts text on images into machine-readable text. It is the single biggest factor in both accuracy and runtime, so enable it deliberately.

  • Enable OCR when the document is a scan, a photo, or a PDF without a selectable text layer.
  • Disable OCR for digital PDFs - it can make conversion several times faster (--no-ocr).
  • default mode keeps existing text and only OCRs pages that are missing text.
  • full_page mode OCRs every page and overwrites the detected text.
EnginePlatformBest forNotes
autoAllLetting Docling chooseDefault and safest starting point.
RapidOCRCross-platformCPU-friendly multilingual OCRONNX-based; no heavy dependencies.
Tesseract (tesserocr)Cross-platform (system binary)Mature OCR with many languagesNeeds Tesseract and language data installed.
EasyOCRCross-platformSimple setupDownloads its own models on first use.
OcrMacmacOS onlyNative Apple Vision OCRAvailable only on macOS.
Nemotron OCRLinux + CUDAGPU-accelerated OCRRequires a supported CUDA environment.
4
Tables

Table extraction

Tables are reconstructed from layout, not from raw text, so the mode you choose changes the result quality.

ModeModelAccuracySpeedUse when
accurateTableFormerHighSlowerMerged cells, borderless tables and financial reports.
fastFast structure modelApproximateFasterYou only need a rough table and want speed.
5
Enrichment

Enrichment

Enrichment adds neural post-processing to detect specialised content. Enable it only when the document actually contains it.

OptionWhat it extractsWhen to enableCost
--enrich-codeCode blocksTechnical and developer documents.Extra model pass
--enrich-formulaLaTeX formulasScientific and academic PDFs.Extra model pass
--enrich-chart-extractionChart dataReports containing charts.Extra model pass
6
Output

Output format

Choose what you want to do with the result; the preview also updates the export call in the Python snippet.

FormatWhat you getBest for
Markdown (md)Readable text with tablesNotes, documentation and RAG text.
Docling JSON (json)Lossless DoclingDocument with bounding boxesCustom pipelines and downstream processing.
HTML (html)Tables and layout as HTMLWeb previews and email.
DocTags (doctags)Compact token-style markupModel input and token workflows.
7
Performance

Accelerator and threads

Docling runs on CPU, on NVIDIA GPUs (CUDA) and on Apple Silicon (MPS). auto selects CUDA, then MPS, then CPU.

  • Use --device cuda on NVIDIA hardware for large batches.
  • Use --device mps on Apple Silicon.
  • On CPU, disable OCR and enrichment you do not need.
SettingValuesEffect
--deviceauto, cuda, mps, cpuSelects where neural inference runs.
--num-threadsInteger (default 4)CPU parallelism; too many threads can slow a small machine.
8
Flags

Generated flags reference

These are the flags the generator can emit, with the Python option each one maps to. For the complete CLI surface, see the CLI reference.

FlagValuesApplies toPython equivalent
--tomd, json, html, doctagsAllexport_to_markdown(), export_to_dict(), export_to_html(), export_to_doctags()
--ocr-engineauto, rapidocr, tesserocr, easyocr, ocrmac, nemotron-ocrPDF & imagespipeline_options.ocr_options
--ocr-modedefault, full_pagePDF & imagespipeline_options.ocr_options
--no-ocrflagPDFpipeline_options.do_ocr = False
--table-modeaccurate, fastPDFpipeline_options.do_table_structure
--enrich-codeflagPDFpipeline_options.do_code_enrichment
--enrich-formulaflagPDFpipeline_options.do_formula_enrichment
--enrich-chart-extractionflagPDFpipeline_options.do_chart_extraction
--deviceauto, cuda, mps, cpuAllAcceleratorOptions(device=...)
--num-threadsIntegerAllAcceleratorOptions(num_threads=...)
9
Python

The Python equivalent

The generator builds this snippet for you. For PDFs it configures a PdfPipelineOptions object and registers it through format_options; for every other format a plain DocumentConverter() is enough.

from docling.document_converter import DocumentConverter, PdfFormatOption
from docling.datamodel.base_models import InputFormat
from docling.datamodel.pipeline_options import PdfPipelineOptions

pipeline_options = PdfPipelineOptions()
pipeline_options.do_ocr = True
pipeline_options.do_table_structure = True

converter = DocumentConverter(
    format_options={InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)}
)

result = converter.convert("report.pdf")
print(result.document.export_to_markdown())
  • Swap export_to_markdown() for export_to_dict() to get lossless JSON.
  • Set pipeline_options.do_ocr = False to disable OCR.
  • Use convert_all() to process a batch of files.
10
Presets

Recipes

Copy a preset and change the file name.

Digital PDF, fastest

No OCR, Markdown output.

docling convert report.pdf --to md --no-ocr
Scanned PDF

Full-page OCR, then Markdown.

docling convert scan.pdf --to md --ocr-mode full_page
Research paper

Formulas and code enriched.

docling convert paper.pdf --to md --enrich-code --enrich-formula
Machine-readable structure

Lossless Docling JSON.

docling convert report.pdf --to json
Office documents

Word, PowerPoint and Excel.

docling convert workbook.xlsx --to md
GPU batch

CUDA with more threads.

docling convert report.pdf --to md --device cuda --num-threads 8
11
Warnings

Warnings the generator shows

The generator checks combinations and warns you when a choice will not take effect. Always confirm unusual flags against the official CLI reference.

  • Audio input selected while OCR is on (OCR does not apply to the ASR pipeline).
  • OcrMac selected on a non-macOS platform.
  • Nemotron OCR selected on CPU.
  • OCR disabled but an OCR engine still selected.
12
Privacy

Performance and privacy

The generator runs entirely in your browser, and the commands it produces run Docling locally.

  • Disable OCR for digital PDFs; keep it only for scans.
  • Use --table-mode fast when approximate tables are acceptable.
  • Prefer a GPU for large batches, and tune --num-threads to your machine.
  • Nothing is uploaded: your selections never leave the browser.
13
FAQ

Frequently asked questions

Is the generated command safe to run as-is?
Yes. It uses the current docling convert syntax and only the options you selected. Review it once, then run it in your environment.
Does the generator upload my documents or settings?
No. Everything is computed locally in your browser; nothing is sent to a server. The generated commands process documents on your own machine.
Which OCR engine should I choose?
Start with auto. On CPU-only machines RapidOCR is a good default; use OcrMac on macOS and Nemotron OCR only on a CUDA GPU.
Why does the generated Python look different from the CLI?
The CLI maps flags onto pipeline options internally. The Python snippet makes that mapping explicit so you can tune it further.
Do I need a GPU?
No. Docling runs on CPU. A GPU mainly speeds up OCR and enrichment on large documents.
Can I use the generated command on Windows, macOS and Linux?
Yes. The same command works on all platforms; only OCR engine availability differs (OcrMac is macOS-only, Nemotron OCR needs CUDA).
How do I get chunks for RAG instead of Markdown?
Generate a Markdown or JSON export, then pass the result to HybridChunker. See the RAG guide.
Are the flags always up to date?
They follow the docling convert interface at the time of the last check. Verify unusual options against the official CLI reference.
14
Next

Keep exploring