← Blog

Document processing

Why a PDF manual is hard to read by machine

A PDF manual is hard to read by machine because a PDF stores where glyphs are drawn, not what they mean. Headings, tables, and order exist only if tagged.

Oct 12, 2026 · Updated Nov 9, 20265 min read11 sources

Why it matters

When software guesses a manual's structure, a warning can end up detached from the step it governs, and the extracted text will not show it.

The short version

  1. 1A PDF records glyphs and graphics placed on a page. Headings, tables, steps, and reading order exist as data only if the file is tagged.
  2. 2Tagging is optional, and files made by printing to PDF generally have no tags, so software has to rebuild structure from how the page looks.
  3. 3Run pdfinfo to see whether a manual is tagged, pdffonts to see whether its fonts map to Unicode, and pdftotext to see whether it has text at all.

A PDF manual is hard to read by machine because a PDF stores where glyphs and lines are drawn on a page, not what they mean. Headings, tables, warnings, steps, and reading order exist as data only if the file is tagged, and tagging is optional (ISO 32000-1, clause 14.8.1).

Without tags, software rebuilds the structure from how the page looks. When it guesses wrong, a warning can end up detached from the step it governs, and the extracted text will not show it.

What a PDF actually stores

What you seeWhat the PDF storesWhat can go wrong
WordsGlyphs drawn from fonts at positionsGlyphs cannot be mapped back to characters
Spaces between wordsOften just gaps between glyphsWords run together or split
A headingLarger or bold text, nothing moreRead as an ordinary paragraph
A tableText at positions, maybe some linesCells misaligned or merged
Reading orderThe order objects were drawnColumns, sidebars, and footers interleaved
A scanned pageA pictureNo text at all until OCR

The text problem is in the standard itself. ISO 32000-1 says text extraction needs a standard encoding or an optional ToUnicode map in each font; without one, glyphs still display but cannot be converted to Unicode (clause 9.10). The Library of Congress puts it plainly: PDF text is based on glyphs within fonts, not Unicode code points (PDF family).

Tagged vs untagged PDF

Tagged PDF, introduced with PDF 1.4, adds a structure tree with standard types such as headings, paragraphs, lists, tables, and figures. The standard says it exists so content can be extracted, reflowed, searched, and converted with structure kept (clause 14.8.1).

TaggedUntagged
Headings and tablesMarked in the structure treeGuessed from font size and position
Reading orderLogical order of the tagsGuessed from position
Running headers and footersMarked as artifacts, outside the structureMixed into the text
Word breaksSpaces must be presentGuessed from gaps

The standard says page content order and logical structure order "may or may not coincide" (clause 14.8.2.3). It also says a tagged file must include the spaces that separate words, so a reader does not have to guess from glyph positions (clause 14.8.2.5).

Many PDFs are made by printing to PDF, which does not create tags. The Library of Congress also cites a 2004 article warning that automated tagging alone is unlikely to give good results unless a document is very simple (PDF family). PDF/UA-1, ISO 14289-1, is the profile that requires everything to be tagged in a logical reading order (PDF/UA-1).

The current version of the standard is PDF 2.0, ISO 32000-2, first published in July 2017 with a dated revision in December 2020 (PDF 2.0).

How to check your PDF manual

Three commands from the poppler tools tell you most of what you need. Install them with sudo apt install poppler-utils on Debian or Ubuntu, or brew install poppler on macOS (Homebrew).

# 1. Is it tagged? Look for "Tagged: yes"
pdfinfo manual.pdf

# 2. If tagged, print the structure tree with its text (first 3 pages)
pdfinfo -struct-text -l 3 manual.pdf | head -60

# 3. Do the fonts map to Unicode? Check the "uni" column
pdffonts manual.pdf

# 4. Is there text at all, and in what order?
pdftotext -f 1 -l 3 -layout manual.pdf - | head -80
  • pdfinfo -struct prints the logical structure of a tagged file (pdfinfo manual).
  • In pdffonts, uni is "yes" if the font has an explicit ToUnicode map. A "no" does not always mean text cannot be extracted (pdffonts manual).
  • pdftotext -layout keeps the physical layout as far as possible (pdftotext manual). Empty output means scanned pages.

Read the result like this:

ResultWhat it meansNext step
Tagged, tree shows headings and tablesBest caseUse the tags, then spot-check them against the page
Tagged, tree is only paragraphsTags exist but carry little structureTreat as untagged
Untagged, text extracts cleanlyStructure must be inferredRun layout analysis
Text extracts as gibberishFonts lack a usable Unicode mappingOCR the pages
No textScanned pagesOCR first; see OCR on scanned manuals

For scans, OCRmyPDF adds a searchable text layer, but its documentation notes that Tesseract does not divide text into paragraphs or headings (OCRmyPDF Introduction).

How software rebuilds structure from an untagged PDF

Layout analysis models draw labeled boxes around page regions. DocLayNet, a hand-labeled set of 80,863 pages that includes manuals, uses 11 labels: Caption, Footnote, Formula, List-item, Page-footer, Page-header, Picture, Section-header, Table, Text, and Title (DocLayNet). The models tested scored 6 to 10 percent below the level at which human annotators agree.

Three gaps matter for manuals:

  • No warning label. DocLayNet has no class for a warning or caution. The labels name kinds of region, not roles in a procedure.
  • Tables are boxes. A Table box does not give rows, columns, or headers. That is a separate step; see table extraction from PDFs.
  • Reading order is its own problem. The LayoutReader authors call reading order detection the cornerstone of understanding visually rich documents, and built ReadingBank, 500,000 page images with reading order taken from Word files (LayoutReader).

Models such as the LayoutLM family read text and position together, but they still depend on the words and boxes extracted from the page.

What this means for a technical manual

On a manual page, a warning box sits above the step it governs, a table's header row defines its cells, and a callout ties an illustration to a parts list. In a tagged file, those relations can live in the structure tree. In an untagged file, software infers them from geometry, using models trained on pages that may look nothing like your manual.

What to do next

  • Run pdfinfo on five manuals and note which are tagged.
  • For tagged files, run pdfinfo -struct-text and check that headings and tables are real tags, not just paragraphs.
  • Run pdffonts and pdftotext -layout to find files with no text or garbled text, and OCR those.
  • For untagged files, test a layout model on your own pages before trusting it.
  • Check that each extracted warning still sits directly before its step, and that every item keeps its page number.

Azcuna's TRACE is one offline viewer for S1000D, MIL-STD-3001 XML, and PDF technical manuals. It keeps the source location and the markings of everything it shows and never modifies the source. It was proposed to NAVAIR under Navy SBIR Phase I topic DON26BZ05-NV078, and the proposal was submitted on September 23, 2026.

Questions people ask

Why is it hard to extract text from a PDF?

Because a PDF is built to show a page, not to store text. The PDF standard, ISO 32000-1, describes text as glyphs painted from fonts. Turning those glyphs back into characters needs a standard encoding or an optional ToUnicode map in the font. Without one, the glyphs display correctly but cannot be converted to Unicode, so copied or extracted text comes out garbled or empty.

What is a tagged PDF?

A tagged PDF carries a structure tree alongside the page content, with standard element types such as headings, paragraphs, list items, tables, and figures, in a logical reading order. ISO 32000-1 introduced the rules with PDF 1.4 and says a writer is not required to produce tagged files. When tags are present and correct, software can read structure directly instead of guessing it from the page.

How can I tell if a PDF is tagged?

Run pdfinfo from the poppler tools on the file. The Tagged line says yes or no. If it says yes, pdfinfo -struct prints the structure tree and pdfinfo -struct-text prints it with the text, so you can see whether headings and tables were actually tagged. A file can be marked tagged and still hold little more than paragraphs.

Why does text from a PDF come out in the wrong order?

Text is stored in the order it was drawn, which may not be reading order. ISO 32000-1 says page content order and logical structure order are distinct and may or may not coincide. In an untagged file, software has to infer reading order from position, and two-column pages, sidebars, and page headers and footers often end up interleaved with the body text.

Can a scanned PDF be read by machine?

Only after optical character recognition. A scanned PDF holds pictures of pages, so there is no text to extract until OCR recognizes it. Tools such as OCRmyPDF add an invisible text layer to a scanned PDF. The OCR output has no headings or tables either, so layout analysis is still needed to rebuild structure.

What is PDF/UA?

PDF/UA-1, ISO 14289-1, is the accessibility profile of PDF. As the Library of Congress summarizes it, content must be tagged with semantically appropriate tags in a logical reading order, and pagination artifacts such as running headers are marked and kept out of the structure tree.

Sources

  1. 1Document management - Portable document format - Part 1: PDF 1.7 (ISO 32000-1:2008, Adobe copy) · Adobe Systems Incorporated
  2. 2PDF (Portable Document Format) Family · Library of Congress
  3. 3PDF 2.0, ISO 32000-2 (2017, 2020) · Library of Congress
  4. 4PDF/UA-1, PDF Enhancement for Accessibility, Use of ISO 32000-1 · Library of Congress
  5. 5pdfinfo(1) manual page · Debian (poppler-utils)
  6. 6pdffonts(1) manual page · Debian (poppler-utils)
  7. 7pdftotext(1) manual page · Debian (poppler-utils)
  8. 8OCRmyPDF Introduction · OCRmyPDF project
  9. 9poppler formula · Homebrew
  10. 10DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis · arXiv (Pfitzmann et al., KDD 2022)
  11. 11LayoutReader: Pre-training of Text and Layout for Reading Order Detection · arXiv (Wang et al.)

Where this shows up in our work

More on document processing