Command-Line PDF to Markdown CLI
Automate batch document conversion in your terminal and CI/CD pipelines. Fast, multi-threaded Rust binary with zero system dependencies.
Test the CLI Parsing Engine Locally
100% In-Browser Conversion — Your Files Are Never Uploaded
Drag & Drop your PDF document here
or browse files on your device
Quick Installation
CLI Command Examples
# 1. Convert single PDF to Markdown
pdftomarkdown report.pdf -o report.md --tables --math
# 2. Batch convert an entire directory with 8 parallel worker threads
pdftomarkdown ./archive/*.pdf -O ./converted_md/ --threads 8
# 3. Stream output to stdout for Unix piping
pdftomarkdown spec.pdf - | grep "### Security" -A 10
# 4. Enable Scanned OCR Mode for rasterized archives
pdftomarkdown old_scan.pdf -o scan.md --ocr --dpi 300 Frequently Asked Questions
Everything you need to know about format extraction, privacy, and markdown compatibility.
How do I install the command-line CLI tool on macOS, Linux, or Windows?
On macOS you can install via Homebrew (`brew install pdftomarkdown`), on Linux via standalone binary or Cargo (`cargo install pdftomarkdown-cli`), and on Windows via Winget (`winget install pdftomarkdown`).
Can I use the CLI inside CI/CD pipelines (such as GitHub Actions)?
Yes! The CLI binary has zero external runtime dependencies and returns standard Unix exit codes (0 for success), making it effortless to integrate into GitHub Actions to automatically generate Markdown documentation from committed PDF specifications.
Does the CLI support streaming to stdout for Unix piping?
Yes. Running `pdftomarkdown document.pdf - | grep '# '` outputs the Markdown stream directly to stdout, allowing seamless piping into `pandoc`, `fzf`, or downstream shell scripts.
How fast is batch conversion across large PDF libraries?
Written in Rust with parallel Rayon execution, the CLI converts an average 50-page PDF in under 450 milliseconds, processing over 120 pages per second on modern multi-core systems.
Related Conversion Guides & Workflows
Explore dedicated documentation for other document formats and developer pipelines.
Python PDF Conversion API
Embed native PDF conversion directly into your Python scripts.
pdftomarkdown vs. Pandoc CLI
Compare CLI usability, table preservation, and math syntax handling.
PDF to GitHub Flavored Markdown
Format CLI outputs for GitHub repository README.md documentation.