How-To Series · Module 2: Daily Driver

Document · Extraction

How read_file converts PDFs, Office documents, and notebooks to text, and what to do when a scanned PDF comes back empty.

After this videoYou can read any document format and recover from scanned PDFs

The read_file tool automatically converts common document formats to readable text, so the agent can inspect a PDF or spreadsheet the same way it reads source code. Jupyter notebooks, Word documents, and Excel workbooks convert with built-in support. PDFs, legacy Office, OpenDocument, and ebooks use an optional converter that installs on first use. Conversion output is Markdown, paginated through the normal offset and limit window, and documents over 50 MB are refused. PDF conversion reads the text layer only, so scanned pages silently convert to nothing. When a meaningful share of pages yields no text, read_file prepends a coverage warning labeling each unreadable gap, so the agent targets only the gaps it needs. For a few pages, render them to images and read with vision. For many pages, use the OCR and documents skill.

About these resources. This episode explains document extraction in Hermes. The Sources block names the Hermes docs page that backs every claim.

New words here · Plain English

one sentence each · full glossary
Text layerThe extractable text inside a PDF. Scanned pages have no text layer and convert to nothing.
Coverage warningA notice read_file prepends when many PDF pages yield no text, labeling each unreadable gap.
OCROptical character recognition, reading text from scanned images. Used for many-page PDFs.

Sources · What this video distills

1 docs page · every command below traces to one of them
Primary guide
Document Extraction
Read ↗

Commands shown · Copy and paste

each shows the source doc it came from
Render a few scanned pages to imagesfrom source ↗
pdftoppm -jpeg -r 150 -f 92 -l 94 document.pdf /tmp/page
Bulk OCR for many pagesfrom source ↗
/ocr-and-documents

Going deeper · Related Hermes docs

further reading · not sources of facts shown above

Next in the series · Episodes that build on this