# AI use cases for Marker (datalab-to/marker)

Repo: [datalab-to/marker](https://github.com/datalab-to/marker) | Use cases: 3 | Page: https://dedupedai.com/use-cases/datalab-to-marker/

Marker converts PDFs, images, PPTX, DOCX, XLSX, HTML and EPUB files into markdown, JSON, chunks or HTML. It formats tables, equations and code blocks, extracts images, strips headers and footers, and can optionally use an LLM to raise accuracy.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Convert a PDF to clean markdown: https://dedupedai.com/use-cases/datalab-to-marker/convert-a-pdf-to-markdown-with-marker/
- Pull just the tables out of a PDF: https://dedupedai.com/use-cases/datalab-to-marker/extract-only-the-tables-from-a-pdf-with-marker/
- Raise accuracy with hybrid LLM mode: https://dedupedai.com/use-cases/datalab-to-marker/boost-marker-accuracy-with-an-llm-for-forms-and-math/

## How to convert a PDF to clean markdown with Marker

Repo: [datalab-to/marker](https://github.com/datalab-to/marker) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Run marker_single on one PDF and get markdown with tables and equations preserved.

**Who it is for:** A researcher or analyst with a paper or report they want as editable text.

**The problem:** Copying text out of PDFs breaks tables, math and reading order.

**The outcome:** A markdown file of the document in the output folder you choose.

### Steps

1. Install with `pip install marker-pdf`
2. Run `marker_single /path/to/file.pdf` to convert one file
3. Add `--output_format` and `--output_dir` to choose format and folder
4. Open the markdown and check tables and equations

### Prompt to paste into your agent

```text
Using datalab-to/marker, install it with `pip install marker-pdf`, run `marker_single /path/to/file.pdf --output_format markdown --output_dir ./out` on <my PDF>, and summarise any pages where the output looks wrong.
```

### Caveat

Balanced mode needs a GPU for best speed; CPU runs default to fast mode.

Risk, download: First run downloads model weights and may spawn a local inference server; expect a large download.

Risk, license: Model weights are free for research, personal use and small startups; check the license for commercial use.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/datalab-to-marker/convert-a-pdf-to-markdown-with-marker/

## How to pull just the tables out of a PDF with Marker

Repo: [datalab-to/marker](https://github.com/datalab-to/marker) | Difficulty: Intermediate | Time: 20 minutes | Basis: From the README

Use the TableConverter to extract tables only, in a page range you pick.

**Who it is for:** An analyst who wants the data tables from a report and not the prose.

**The problem:** Retyping tables from a PDF is slow and error prone.

**The outcome:** Table content converted to markdown for the pages you selected.

### Steps

1. Install with `pip install marker-pdf`
2. Run `marker_single /path/to/file.pdf` on your report
3. Add `--converter_cls` with Marker.converters.table.TableConverter to extract tables only
4. Add `--page_range` to limit which pages are processed
5. Review the output and paste tables into your spreadsheet

### Prompt to paste into your agent

```text
With datalab-to/marker, run `marker_single /path/to/file.pdf --converter_cls marker.converters.table.TableConverter --page_range "0,5-10,20"` on <my report PDF> and turn each extracted table into a CSV.
```

### Caveat

Check numbers against the source; table reconstruction can fall back to a model and may err.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/datalab-to-marker/extract-only-the-tables-from-a-pdf-with-marker/

## How to raise accuracy with hybrid LLM mode with Marker

Repo: [datalab-to/marker](https://github.com/datalab-to/marker) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Add the use_llm flag so an LLM merges tables across pages and fixes inline math and forms.

**Who it is for:** A developer feeding hard PDFs, with math or forms, into a knowledge base.

**The problem:** Default conversion can mangle multi-page tables and inline equations.

**The outcome:** A higher quality markdown file with fewer broken tables and formulas.

### Steps

1. Install with `pip install marker-pdf`
2. Configure your LLM backend as described in the README LLM services section
3. Run `marker_single /path/to/file.pdf` on a hard document
4. Add `--use_llm` to enable hybrid mode
5. Add `--redo_inline_math` with it for the highest quality math conversion

### Prompt to paste into your agent

```text
Using datalab-to/marker, configure an LLM service from its README, then run `marker_single /path/to/file.pdf --use_llm --redo_inline_math` on <my PDF> and compare the result with a run without the flag.
```

### Caveat

The default LLM service is Gemini and needs its own API key.

Risk, cost: Each LLM call is billed to your provider account.

Risk, data: Page content is sent to the LLM service you configure; do not use it on confidential documents without checking.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/datalab-to-marker/boost-marker-accuracy-with-an-llm-for-forms-and-math/
