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.

Published 2026-10-13, updated 2026-10-13. Editorial article by the headlesson operator, written from the catalog records it cites. Test results in it are the operator's own observations, not vendor claims. Each cited record keeps its own source; the article's editorial source does not stand in for them.

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

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.

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

Page updated: 2026-10-13 (the date its content last changed).

要約(日本語): headlesson の運営が、カタログの記録(試用の結果と注意点)だけから書いた使い分けの特集。試用の結果は記載の版・日付での運営の観察で、精度や安全性の保証ではない。