# Marker vs Docling for PDF to Markdown: Setup, Output, and Choosing a Workflow

Compare Marker and Docling for PDF-to-Markdown conversion, including local setup, OCR options, and output handling. Start with the same PDF before choosing a local tool or conversion API.

Marker and Docling both convert PDFs to Markdown. To choose between them, start by clarifying what you need after conversion: an editable document, or structured data to feed a Python application, search index, or data pipeline. You will also need to decide whether you want to manage local models, dependencies, and batch conversion jobs yourself.

This comparison covers workflows and options from the official documentation as of November 10, 2026. It does not rank recognition accuracy or speed.

## How the two tools fit into a workflow

| What you need                       | Marker                                                                             | Docling                                                                        |
| ----------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Convert a PDF from the command line | `marker_single` processes one file and lets you choose a Markdown output directory | `docling convert` accepts a file, directory, or URL and exports Markdown       |
| Continue processing in Python       | Python converters provide programmatic access to text and images                   | Converts input into a Docling document object for export or further processing |
| Handle scans and text layers        | Offers options including forced OCR                                                | Lets you select an OCR engine and processing mode                              |
| Keep images                         | Saves images separately and references them in the Markdown                        | Supports placeholder, embedded, or referenced image output                     |

See the [Marker repository](https://github.com/datalab-to/marker) for its entry points and output options. Docling covers its document object in the [quickstart](https://docling-project.github.io/docling/getting_started/quickstart/) and command-line options in the [CLI reference](https://docling-project.github.io/docling/reference/cli/). While their capabilities overlap, a feature list alone cannot determine which tool will handle a specific scanned book or complex layout better.

## Check the environment before installing

Marker requires Python 3.10 or later and PyTorch. For model inference, running on an NVIDIA GPU uses Docker and the NVIDIA Container Toolkit, while running on CPU or Apple Silicon requires llama.cpp's `llama-server`. Configure the environment described in Marker's [installation and inference backend instructions](https://github.com/datalab-to/marker#installation) before running your first conversion.

Docling also depends on machine learning models and PyTorch. Installation steps vary by operating system, processor architecture, and available accelerators. Intel Mac users in particular should follow the compatibility guidance in the [installation documentation](https://docling-project.github.io/docling/getting_started/installation/). Additional OCR engines may also require their own system dependencies.

Install each tool in a separate Python virtual environment to avoid dependency conflicts. First-run model downloads and preparation also affect startup time, so keep that initial setup separate from routine conversion benchmarks.

## Start with the same PDF

The commands below follow the official documentation as of November 10, 2026. Prepare a local `sample.pdf` and install each package in its own environment. Because these commands install the current release, record the exact version numbers and settings you test.

Marker:

```bash
python -m pip install marker-pdf
marker_single "sample.pdf" --output_format markdown --output_dir "marker-output"
```

Docling:

```bash
python -m pip install docling
docling convert "sample.pdf" --to md
```

Run `marker_single --help` and `docling convert --help` to confirm that your installed versions support these options. If a model backend fails to start, resolve the dependency error before evaluating conversion output; the document may not have been processed yet.

## Compare output against your next task

To evaluate output for research notes or manual editing, choose a sample document containing two-column text, a table, and an illustration. Open both converted files alongside the source PDF. Read a complete passage across a column break, then check the table headings and image references. A higher character count does not necessarily mean better reading order or layout recovery.

If you are preparing content for search or retrieval, run a small set of outputs through your downstream pipeline. Consider how you will split sections, link figures to surrounding text, and locate the original source after a search hit. Evaluate Docling's document object and Marker's structured output at this stage, before flattening everything into a single text string.

Markdown output may include HTML tables or mathematical notation that your editor cannot render. When a table looks malformed, check whether it is an extraction error or just a preview issue; the [PDF tables to Markdown guide](https://pdfcraft.ai/en/blog/pdf-tables-to-markdown/) explains what to examine. Be sure to keep any generated [image assets](https://pdfcraft.ai/en/blog/pdf-markdown-image-assets/) when relocating your output files.

Record your source files, package versions, hardware setup, OCR settings, and any enabled models. Comparing processing times alongside the amount of manual editing required gives you a practical baseline for choosing a tool for your documents.

## Run locally or use a conversion service

Marker and Docling are good starting points when you need full control over the runtime environment and plan to customize the extraction workflow. Be prepared to manage dependencies, model weights, job queues, and error recovery alongside the packages themselves.

If you primarily need a Markdown file without managing local infrastructure, you can use [PDF Craft online](https://pdfcraft.ai/en/pdf-craft/). For application integration, follow the [Python conversion tutorial](https://pdfcraft.ai/en/blog/pdf-to-markdown-python/): the service handles document conversion while your code uploads the file, monitors the job, and retrieves the result. An online service processes uploaded documents on remote infrastructure and charges for usage; see the [current rates](https://pdfcraft.ai/en/recharge/).

Test a representative file first to verify that the output fits your downstream requirements before processing an entire document library.

