OCR Reader

Table Template – YAML Configuration Guide

Overview

Table templates are used to extract structured row-based data such as invoice items, product lists, or reports.

Configuration is defined in a YAML file which must be created manually in a text editor. OCR Reader does not include a built-in YAML editor.

Always use spaces for indentation. Incorrect formatting will break parsing.

Basic Template Structure

template:
  type: table
  name: invoice_items

source:
  type: pdf

This defines the template type and input source.

Columns Definition

Columns define the structure of extracted data.

columns:
  - name: item
    type: text
  - name: quantity
    type: number
  - name: price
    type: currency

Supported data types

Row Detection

Row detection controls how individual rows are separated.

row_detection:
  mode: dynamic
  tolerance: 5

Full Example

template:
  type: table
  name: invoice_items

source:
  type: pdf

columns:
  - name: item
    type: text
  - name: quantity
    type: number
  - name: price
    type: currency

row_detection:
  mode: dynamic
  tolerance: 5

Best Practices

Back to Documentation