Comparison · Same 38 public documents · Open benchmark
anymd vs pdftotext
pdftotext is the plain-text extractor in Poppler's command-line utilities: fast, already installed on many Linux machines, and often the first thing a pipeline uses to feed a PDF to an LLM. anymd is one native Rust binary that returns Markdown with tables, headings and page anchors, reads scans with OCR, reads Office files, EPUB and HTML as well, and is also an MCP server. On the 38 public documents of AgentDocBench, anymd scores 96.4 to pdftotext's 42.2. On the 20 born-digital PDFs, the speed is the same: 0.87 s for anymd and 0.88 s for pdftotext, in 200,747 and 201,435 output tokens.
Install anymd free See the full benchmark
npx -y @sylphx/anymd setup --client cursor,claude-code,codexAt a glance
| anymd | pdftotext | |
|---|---|---|
| What it is | One native Rust binary: CLI and MCP server | A command-line tool in Poppler's utilities, built on the Poppler PDF library |
| Install | npx -y @sylphx/anymd setup, Homebrew, Scoop, Cargo or Docker | apt install poppler-utils, brew install poppler or your platform's Poppler package; often already installed |
| Inputs | PDF, Word, PowerPoint, Excel, CSV, EPUB, HTML and URLs, images with OCR, audio and video | PDF only |
| Output | Markdown with headings, tables and <!-- page N --> anchors; JSON with geometry through inspect | Plain text; -layout keeps the physical layout, and -bbox writes each word's bounding box as XHTML |
| Scanned PDFs | Local OCR with tesseract, or a local document model after anymd setup ocr | No OCR |
| MCP tools | Built in: read, outline, search, inspect | None |
| AgentDocBench overall | 96.4 | 42.2 |
| Documents converted | 38/38 | 23/38: the 15 files that are not PDFs are not supported |
| Table cells F1 | 92.2 | 0.0 |
| Time, the 23 PDFs both read | 11.4 s, of which 10.5 s is OCR on 3 scans | 0.90 s |
| Time, the 20 born-digital PDFs | 0.87 s | 0.88 s |
| Licence | MIT | GPL; Poppler's README says programs that call the Poppler library must be GPL as well |
| Price | Free, MIT. Optional anymd Pro, one payment | Free |
Measured on the same 38 documents
AgentDocBench checks what an agent needs from a converter: the words verbatim, in reading order, with tables intact, fast, and in as few tokens as possible. Scores are 0 to 100; higher is better.
| AgentDocBench | anymd 8.2.0 | pdftotext 24.02.0 |
|---|---|---|
| Overall | 96.4 | 42.2 |
| Documents converted | 38/38 | 23/38 |
| Sentences kept verbatim | 97.7 | 60.6 |
| Text F1 | 97.2 | 71.4 |
| Reading order | 98.8 | 52.0 |
| Table cells F1 | 92.2 | 0.0 |
| Time, the 23 documents both converted | 11.4 s | 0.90 s |
| Output tokens, the 23 documents both converted | 207,030 | 201,448 |
anymd spends 10.5 s of its 11.4 s on the 3 scanned documents, which it reads with OCR and where pdftotext scores 0.0. On the other 20, anymd takes 0.87 s and pdftotext 0.88 s, and they return 200,747 and 201,435 output tokens.
Document by document, anymd scores higher on 36, pdftotext on 2, and 0 are tied.
A document a tool did not convert scores 0. On the 23 documents both converted, the overall is 94.8 for anymd and 68.0 for pdftotext, and time and tokens above are measured on those 23.
By category
| Category | Documents | anymd | pdftotext |
|---|---|---|---|
| Papers (math) | 3 | 96.7 | 83.3 |
| Two-column papers | 3 | 98.1 | 75.0 |
| Reports | 2 | 96.9 | 87.5 |
| Financial tables | 4 | 95.2 | 74.0 |
| Forms | 3 | 98.0 | 74.2 |
| Scanned (OCR) | 3 | 77.9 | 0.0 |
| CJK | 3 | 99.1 | 75.0 |
| Slides | 4 | 96.0 | 37.5 |
| Spreadsheets | 4 | 100.0 | 0.0 |
| Word | 3 | 99.9 | 0.0 |
| EPUB | 3 | 98.9 | 0.0 |
| HTML | 3 | 99.6 | 0.0 |
Where pdftotext scores higher: paper-rankone (100.0 vs 94.8); report-plz (100.0 vs 99.0).
Leave out Scanned (OCR), Spreadsheets, Word, EPUB, HTML, where pdftotext scores 0, and the overall is 97.1 for anymd and 72.4 for pdftotext.
Where pdftotext shines: speed. It read the 23 PDFs in 0.90 s, because it runs no OCR. anymd returns 3% more output tokens on those 23 (207,030 against 201,448), and the difference is the text it reads from the three scans. On born-digital PDFs, pdftotext's own output is the reference text that text F1 is scored against, so its text F1 there is 100 by construction; that is why it scores 100.0 on two documents without tables.
How it was measured
Both tools ran on GitHub-hosted Linux x86_64 runners with 4 CPUs: pdftotext 24.02.0 from the runner's poppler-utils as pdftotext -enc UTF-8 file.pdf -, in its default reading-order mode without -layout, on 2026-09-25, and anymd 8.2.0 on 2026-10-01. Time is the wall time of a fresh process per file, start-up included: the median of three runs after a warm-up for both tools. pdftotext was given only the PDFs, so the 15 other files count as not supported and score 0, as they would for any tool that cannot read them. Newer Poppler releases were not measured. Tokens are counted with o200k_base.
The benchmark lives in the anymd repository. The scoring does not know which tool produced an output, and the corpus, ground truth, scoring and raw results are public in bench/. Anyone can rerun it or submit a tool.
Why agent builders switch from pdftotext
The same speed, with structure
On the 20 born-digital PDFs, anymd took 0.87 s and pdftotext 0.88 s. In that time anymd also finds headings, lists and tables, removes running headers and page numbers, and marks every page with <!-- page N --> so an agent can cite it.
Tables an LLM can read
Plain text flattens a table into a stream of numbers. anymd returns Markdown tables, so table cells F1 is 92.2 against 0.0, financial tables score 95.2 against 74.0, and forms 98.0 against 74.2.
One tool for every file
pdftotext skipped the 15 Word, PowerPoint, Excel, CSV, EPUB and HTML files in the benchmark and scored 0 on the three scans. anymd converted all 38. Leave out the five categories where pdftotext scores 0, and the overall is still 97.1 for anymd and 72.4 for pdftotext.
Built for agents
npx -y @sylphx/anymd setup adds anymd to Claude Code, Codex, Cursor, VS Code, Claude Desktop, Windsurf and Gemini CLI at once. The MCP tools add what an agent needs for long files: outline to jump to a section, read with a token budget and a cursor, and search across a folder. Files stay on your machine, and --allow-dir keeps the MCP server inside one folder.
When pdftotext is the better fit
- You need only the raw text layer of born-digital PDFs, and pdftotext is already on the machine or in the image.
- Your scripts depend on
-layoutfixed-width text or-bboxword coordinates as XHTML. - You want the PDF's text exactly as Poppler reads it, for example as reference text for an evaluation, as this benchmark does.
Switch in one line
pdftotext -enc UTF-8 report.pdf report.txt # pdftotext
anymd report.pdf -o report.md # anymd, after npm install -g @sylphx/anymdFor MCP, add npx -y @sylphx/anymd to your client, or run npx -y @sylphx/anymd setup to add it to every client. With Docker:
docker run --rm -v "$PWD:/data" ghcr.io/sylphxai/anymd report.pdf > report.mdMore install options are in Getting started.
Check what your agent cites with anymd Pro
Converting a file is free. When an agent quotes a PDF or a video, anymd Pro takes you back to the source:
- Cite-check compares up to 100 quotes per request with the page and area each one cites, and reports whether it matches, doesn't match, or needs more evidence. It uses the text and its position on the page, not an AI opinion.
- Video timelines and frames show scenes, chapters and subtitle or transcript timings, and the frame behind a cited moment with its actual decoded timestamp and a SHA-256 hash of the image.
Pay once, US$29 or the local price in 16 currencies, for a 100-year licence for one person. Pro works offline, with no subscription and no account. Prefer a hosted service? Use Sylphx AI parse to convert documents without installing a local runtime, and pay per page.
FAQ
Is anymd a drop-in replacement for pdftotext? For feeding PDFs to an LLM, yes: anymd report.pdf -o report.md replaces pdftotext report.pdf report.txt and returns Markdown instead of plain text. Scripts that parse -layout or -bbox output need changes; anymd's inspect returns elements with bounding boxes as JSON.
Is pdftotext faster than anymd? On the 23 PDFs both read, pdftotext took 0.90 seconds and anymd 11.4 seconds, because anymd spent 10.5 seconds reading the three scanned PDFs with OCR, where pdftotext scores 0. On the other 20 PDFs, anymd took 0.87 seconds and pdftotext 0.88 seconds.
Why does pdftotext score 42.2? A document a tool did not convert scores 0. pdftotext reads only PDFs, so the 15 Word, PowerPoint, Excel, CSV, EPUB and HTML files score 0; it has no OCR, so the three scans score 0; and plain text has no tables, so its table cells F1 is 0. On the 23 documents both converted, the overall is 94.8 for anymd and 68.0 for pdftotext.
Is the benchmark scored against pdftotext? In part. For born-digital PDFs, the reference text for text F1 is pdftotext's output, so pdftotext scores 100 on text F1 there. Sentences, reading order and tables are scored against the ground truth in bench/truth/, which is checked against the rendered pages.
Is the benchmark biased toward anymd? It lives in the anymd repository, so you can check it: the scoring does not know which tool produced an output, the corpus and ground truth are public, and the documents where pdftotext scores higher are published. Anyone can rerun it or add a tool.
Is anymd free? Yes. anymd is MIT licensed, including the CLI, the MCP server, OCR and transcripts. anymd Pro is an optional one-time purchase, US$29 or the local price in 16 currencies, that adds PDF cite-check and video timelines and frames.
pdftotext is part of Poppler, a freedesktop.org project; anymd is not affiliated with or endorsed by the Poppler project. Benchmark figures come from the AgentDocBench results committed in the anymd repository. pdftotext details come from its manual page and Poppler's README.