# summary

Extract the text of a PDF file to Markdown.

# description

Reads a PDF file and converts its text content to Markdown, preserving paragraph breaks. Use this to turn a large PDF reference into a greppable `.md` file instead of trying to `Read` the binary whole (which fails and blows the context window). Output goes to a file with `--out`, or to stdout when `--out` is omitted.

# examples

- `sf setup-agents extract pdf-to-markdown --input spec.pdf --out spec.md`
- `sf setup-agents extract pdf-to-markdown -i spec.pdf`

# flags.input.summary

Path to a PDF file to extract.

# flags.out.summary

Path to write the Markdown output. When omitted, the result is printed to stdout.

# info.wrote

Wrote %s (%d bytes).

# error.read

Could not read %s: %s

# error.parse

Could not extract any text from %s. The file may be empty, image-only, or not a valid PDF.
