Use layout data when text must remain locatable on the page

Use a layout format when future users need to locate text on the page. Document coordinate units, page dimensions, reading order, schema version, and engine metadata.

The handoff should state the format version, page dimensions, coordinate units, origin, reading order, engine metadata, and source identifier needed to interpret every text region later.

Inspect the output structure with PDF to Text. Continue with OCR Output Formats: TXT, JSON, TSV, hOCR, ALTO and PDF and Multi-Column OCR and Reading Order Review.

Layout representation

NeedUseful propertyCaution
Highlight search resultWord bounding boxCoordinates need page geometry
Rebuild linesLine and word hierarchyDetected order may be wrong
Preserve page zonesRegion types and boxesTypes may be engine-specific
Archive interoperabilityDocumented schemaExtensions need documentation

Check whether a token can be traced back to the page

Select one word, line, block, and page from the export. Confirm that coordinate units, page origin, dimensions, text hierarchy, and reading order are documented well enough to locate each item on the source image. Inspect how spaces, hyphenation, confidence, and alternative readings are represented.

ALTO, hOCR, and TSV are not interchangeable labels for the same structure. Validate against the chosen format, preserve the page identifier and image dimensions, and test the consuming application. A technically valid file can still be operationally unusable if its coordinate assumptions or hierarchy differ from the downstream system.

  • Document coordinates and origin
  • Validate hierarchy and reading order
  • Test with the actual consumer

Record coordinates, hierarchy, reading order, and provenance

Understand the hierarchy

Layout formats commonly nest pages, regions, text blocks, lines, and words. Review whether the hierarchy represents visual containment, reading order, or both before building a consumer.

Record coordinate systems

Coordinates may use pixels or physical units. Retain page width, height, image resolution, origin, and rotation. A bounding box without its coordinate system cannot be placed reliably on another rendition.

Distinguish layout from semantics

A block can be correctly located without being identified as a heading, caption, footnote, table header, or decorative element. Accessibility and structured data require additional review.

Version the representation

Store the OCR engine, language model, format or schema version, preprocessing history, and generation date. Validate XML or HTML where appropriate and keep local extensions documented.

Layout-format handoff check

  • Choose a documented layout format
  • Retain page dimensions and units
  • Validate the file structure
  • Record engine and schema versions
  • Test overlays against source images

Coordinates are meaningless without their frame

Page size, units, origin, rotation, hierarchy, and format version must travel with the boxes. A coordinate value alone cannot locate text reliably in another renderer.

How specifications should be used

Read the exact version of the format specification and inspect representative engine output. Extensions and optional fields may differ even when both files use the same format name.