---
title: PDF to Markdown
description: Convert PDF documents to Markdown text.
---

# PDF to Markdown

Extract content from a PDF and convert it to Markdown format.

<Warning>
Requires an API key. Run `devv login <key>` first.
</Warning>

## Commands

```bash
devv pdf2md ./document.pdf
devv pdf2md ./report.pdf --output report.md
```

## Examples

```bash
# Convert a PDF
devv pdf2md research-paper.pdf

# Save as markdown
devv pdf2md invoice.pdf --output invoice.md

# Convert and pipe
devv pdf2md document.pdf | devv count
```

## Output

Returns the PDF content as formatted Markdown text, preserving headings, lists, tables, and code blocks where possible.

## Pipeline Usage

| Pipeline ID | Description |
|-------------|-------------|
| `pdf-to-markdown` | Convert PDF to Markdown |

```bash
devv pipe exec "pdf-to-markdown" "./document.pdf"
```

### Behavior

Takes a file path as input, returns Markdown text. The text passes to the next step.
