Getting text out of a PDF: which recorded tool for which PDF
For assistants asked to pull text or values out of PDF files, this feature separates tools that are easy to confuse (text extraction, OCR, PDF structure and document conversion) and gives one check-first sequence built from headlesson's records. Test results are dated operator observations on the stated version; descriptions of what a tool does come from its documentation, and qpdf's lesson has not been run. None of it is an accuracy guarantee.
Text layer or page images decide the tool
A PDF either carries a text layer or is only page images. Poppler utilities (app:poppler) (pdftotext) reads the text layer; on an image-only PDF it gave no text in headlesson's 2026-10-11 test with Poppler 26.04.0, yet exited 0 and wrote a single form feed. Tesseract OCR (app:tesseract) reads images of text, not PDF files, so a scanned PDF is first rendered to images. Decide which kind of PDF you have before choosing.
Tools that are easy to confuse
- Poppler utilities (
app:poppler) extracts text and metadata (pdftotext, pdfinfo) and renders pages to images (pdftoppm). Its lesson passed all 7 steps on 26.04.0. - Tesseract OCR (
app:tesseract) is an OCR engine for images. Its lesson rendered a self-made PDF to a 300 dpi PNG with Poppler utilities (app:poppler)'s pdftoppm and recognised the text; all 8 steps passed on 5.5.1. The pdftoppm step there only made a test image; Tesseract itself does not need Poppler. - qpdf (
app:qpdf) checks, splits, merges and rewrites PDF structure; its record states it does not render PDFs or extract text. headlesson has not run its lesson. - Docling (
app:docling) and Marker (app:marker) convert whole documents to Markdown or JSON with local models. Docling (app:docling)'s lesson passed 3 steps on 2.137.0 with one self-made sample; Marker (app:marker)'s stopped after install and help on 2.0.0: conversion first requested a font, headlesson's own test guard blocked that download, and models were not downloaded, so its conversion is unverified. - Mistral OCR (
app:mistral-ocr) is a paid external OCR API; headlesson did not run an authenticated OCR request because it needs an owner key and approval to send documents out; a request without a key returned HTTP 401. - KAMISCAN (kasc) (
app:kamiscan) is a worksheet reader made by the headlesson operator; its passed lesson used a no-reader mode that reads no text, so it is not evidence of OCR.
A check-first sequence for one PDF
With Poppler utilities (app:poppler) and Tesseract OCR (app:tesseract), both tested on macOS on 2026-10-11: run pdfinfo to see the page count and encryption; extract with pdftotext and check that the output is not empty, not only the exit code; if it is empty, or if some pages or regions are scans (non-empty text for the whole file can hide pages that gave no text), render those pages with pdftoppm at 300 dpi and run tesseract on the images with a language listed by tesseract --list-langs. In Tesseract OCR (app:tesseract)'s test a 50 dpi render was misread ("Inyatce 2026") with exit 0, so compare a sample of the OCR text, and of pdftotext's text, with the original pages. headlesson tested each tool's lesson separately; this branch as one script was not run.
What the records do not show
None of these records measures accuracy on real documents, Japanese text, general tables or handwriting; Docling (app:docling)'s test matched one small table (Alpha 2, Beta 3) on one self-made page, which is not an accuracy rate. Docling (app:docling) and Marker (app:marker) record that a successful conversion is not proof of a faithful transcription, and Tesseract OCR (app:tesseract)'s record asks to spot-check the OCR text against the image. Use headlesson_get with sections ["lesson","gotchas"] on Poppler utilities (app:poppler), Tesseract OCR (app:tesseract) or any ID above for the exact steps, versions and failure conditions.
Records cited
Each line gives the record, its public page if there is one, and where its name comes from.
- Poppler utilities —
app:poppler; source: https://poppler.freedesktop.org/ (checked 2026-10-11, primary, official) - Tesseract OCR —
app:tesseract; source: https://github.com/tesseract-ocr/tesseract (checked 2026-10-11, primary, official) - qpdf —
app:qpdf(no public page yet; available over MCP); source: https://qpdf.readthedocs.io/en/stable/cli.html (checked 2026-10-11, primary, official) - Docling —
app:docling; source: https://github.com/docling-project/docling/blob/main/README.md (checked 2026-10-09, primary, official) - Marker —
app:marker; source: https://github.com/datalab-to/marker/blob/master/README.md (checked 2026-10-09, primary, official) - Mistral OCR —
app:mistral-ocr(no public page yet; available over MCP); source: https://docs.mistral.ai/capabilities/document_ai/basic_ocr (checked 2026-10-09, primary, official) - KAMISCAN (kasc) —
app:kamiscan(no public page yet; available over MCP); source: operator-provided; not publicly verifiable (checked 2026-10-09, primary, official)
Article source
headlesson editorial judgement (checked 2026-10-13, inferred, editorial).
Retrieve over MCP
headlesson_get id="feature:pdf-text" on https://mcp.headlesson.com/mcp