Scanix Docs
LearnTutorials

Tutorial: Build a template

Create a template that captures fields from an invoice, with an anchor.

In this tutorial you'll build a capture template by hand, from a blank canvas, using a real invoice as your example. You'll load a sample page, draw a zone over each value you want to capture, set the Type so the value comes out clean, turn those zones into exportable Index Fields, and add a Text label anchor so the template keeps lining up even when later scans drift. By the end you'll have a reusable invoice template you can run against a whole batch.

Allow about fifteen minutes. You'll need one clear, representative invoice — a PDF or an image file — that looks like the rest of the batch you intend to process.

Prefer to let AI do it?

This tutorial draws everything by hand so you understand every piece. If you'd rather drop in one sample and have AI propose the zones, fields, and anchor for you, use Smart Templates instead — then come back here to refine the result in the Designer.

What you'll have at the end

  • A saved invoice template built in the Designer, with its sample page stored alongside it.
  • A handful of capture zones — invoice number, date, and total — each with the right Type so the value validates cleanly.
  • Those zones promoted to Index Fields, the columns that land in your export.
  • A Text label anchor pinned to a printed label, so the zones follow the layout on drifted or shifted scans.
  • A reusable template ready to run against the rest of your invoices.

Step 1 — Open the Custom Builder

From the left navigation, open Templates. At the top of the page you'll see three creation tiles in a row: Smart Template, Custom Builder, and Guided Wizard.

Click Custom Builder (its subtitle reads "Full control over every setting"). The Designer opens on a blank template, with a section list down the left for the different parts of a template — its source, scan and image clean-up, zones, index fields, and more.

Screenshot

The Templates page with the three creation tiles — Smart Template, Custom Builder, and Guided Wizard — the Custom Builder tile highlighted. — shot tutorials-build-a-template-01

Step 2 — Name the template

At the top of the Designer is the Template Name field. Type a name you'll recognise later, such as Invoice.

A name is required to save, so it's worth setting first. The top bar keeps track of unsaved changes — it shows Unsaved changes until you save.

Step 3 — Load your sample invoice

The Designer needs a sample page to draw on. Open the OCR Zones section from the left, then click Load Sample on the empty canvas. Choose your invoice file.

The page renders into the canvas. This image is stored with the template, so the zones you draw stay pixel-accurate against the exact page you started from.

Open OCR Zones

In the Designer's left section list, click OCR Zones. This is where the sample page and your capture zones live.

Load the page

Click Load Sample and pick your invoice. Wait for the page to finish rendering, then your invoice appears ready to draw on.

Screenshot

The OCR Zones section with an invoice loaded into the canvas, ready to draw zones on. — shot tutorials-build-a-template-02

Step 4 — Draw a zone for the invoice number

A zone is a rectangle you draw over a value you want to capture. On every page Scanix processes, it finds that same region and reads only what's inside it.

Drag a box on the canvas around the invoice number — the value itself, plus its printed label if that's easiest. You draw a zone by dragging, select one by clicking it, and reposition it by dragging it once it's selected.

The moment you draw a zone, the editor opens beside the canvas and runs OCR on the region. The OCR Preview panel shows what was read — your proof that the zone is in the right place.

Draw the box

Drag a rectangle over the invoice number on the canvas. Don't worry about pixel precision — you can select the zone and drag to nudge it afterwards.

Name it and set the Type

In the zone editor, set Name to something clear like InvoiceNo. Then open the Type dropdown and choose the type that matches the value:

  • Text for a free-form reference like an invoice number.
  • Number, Currency, Date, Email, or Phone when the value is one of those — Scanix cleans and validates it for you.

When the box also caught the printed label, the right Type lets Scanix strip the label and keep just the value, so something like Invoice No: INV-2026-0042 comes out as the reference alone.

Screenshot

A zone drawn over an invoice number, with the zone editor open showing Name, the Type dropdown, and the OCR Preview panel displaying the captured value. — shot tutorials-build-a-template-03

Check the OCR Preview

Read the OCR Preview panel. If it shows the value you expected, the zone is good. If it's empty or wrong, nudge the box so it sits tightly over the value, or adjust the Type — the preview re-runs automatically.

Step 5 — Add the date and total

Repeat the same loop for the other values you want from the invoice:

  • Draw a zone over the invoice date, name it InvoiceDate, and set its Type to Date.
  • Draw a zone over the total amount, name it Total, and set its Type to Currency.

Check each one's OCR Preview before moving on. Three clean zones — number, date, and total — is plenty to make a useful template; add as many as your batch needs.

One value per page

Capture runs per page: a multi-page invoice captures one value per page for each zone, and that page number travels with the value all the way into your export. See Per-page field capture.

Step 6 — Turn zones into index fields

Your zones read values off the page; Index Fields are the named columns those values land in when you export. The fastest way to create them is straight from the zones you just drew.

Open the Index Fields section. Click Import from Zones — it offers to create one field per unlinked zone, so InvoiceNo, InvoiceDate, and Total each become a field with its Source set to OCR Zone and its Linked Zone wired to the matching zone.

You can also add fields by hand with Add Field, then set each row's Field Name, Type, and Source. Mark a field Req. when a document shouldn't pass without it.

Screenshot

The Index Fields section after Import from Zones, showing three rows — Field Name, Type, Source (OCR Zone), and Linked Zone — for the invoice number, date, and total. — shot tutorials-build-a-template-04

For the difference between a zone and an index field, and the field settings you can tune, see Index fields.

Step 7 — Add a text-label anchor

Real scans drift: a page feeds in a few millimetres lower, or slightly rotated, and a fixed rectangle drawn on your sample no longer lands on the right text. An anchor fixes that. It pins a zone to a nearby landmark — most often a printed label — and Scanix re-positions the zone relative to where it actually finds that label on each page.

Let's anchor the invoice-number zone to its printed label.

Open the zone's Anchoring tab

Select the invoice-number zone, then open its Anchoring tab in the editor and tick Enable to switch anchoring on for that zone.

Choose a Text label anchor

Set the Anchor target to Text label, then type the printed label that sits beside the value into Anchor value — for example Invoice No. You can also draw a Search in region on the sample so Scanix looks for the label in the header strip first, which makes the match faster and less ambiguous.

Tune the match

Leave Fuzzy match and Case-insensitive on so small OCR differences and capitalisation don't break the anchor. Turn on Search whole page if not found if the label can move around the page between documents — Scanix then widens the hunt across the whole page, and a strong, close-by match still wins over a faint one far away.

Screenshot

The Anchoring tab for the invoice-number zone: the Anchor target set to Text label, the printed label entered in Anchor value, and Fuzzy match and Case-insensitive enabled. — shot tutorials-build-a-template-05

Anchor the zones that drift most

You don't have to anchor every zone. Anchor the ones whose position varies between documents — a header reference, a total that moves with the line-item count. Anchoring is its own deep topic, including using several anchors together and anchoring to a barcode or QR code; see Anchoring.

Step 8 — Save

When the zones preview cleanly, the index fields are wired up, and your anchor is in place, click Save in the top bar of the Designer. The bar switches from Unsaved changes to Saved ✓, and your template appears back in the Templates list.

A name is required to save

Save stays disabled (with Template name is required) until the template has a name. If you skipped Step 2, fill in the Template Name field at the top of the Designer, then save.

That's it — you've built a reusable invoice template by hand. It carries your sample page, your typed zones, your exportable index fields, and a text-label anchor that keeps everything aligned as your scans vary.

Next steps

Tutorial: Build a template — Scanix Docs · Scanix