PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloper’s Guide

Area Mapper

Picks values out of the text extracted from a PDF by area, neighbouring words and patterns, and maps them to keys.

The Area Mapper action reads the words that Extract Text found in a PDF and picks out the ones that sit in an area you describe: between coordinates, below or beside a label word, matching a pattern. Each area gets a key, such as InvoiceNumber or Total, so the result reads like a form. It works best on documents with a stable layout, such as invoices from the same supplier.

Add the action

In the Process Designer toolbox, open PDF and pick Area Mapper (or type Area Mapper in the search box). Put an Extract Text action before it.

The Area Mapper action properties: Extracted Words, Area Configuration and Mapped Areas

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
Extracted WordsInputList of any typeYesThe Extracted Text output of the Extract Text action.
Area ConfigurationInputJSONYesA JSON list, one object per area to map (see below).
Mapped AreasOutputList of any typeYesOne item per area and per page: {"page": …, "key": …, "values": […]}.

Area configuration

Every property is optional except MapToKey.

PropertyTypeWhat it does
MapToKeyTextThe key the values are returned under.
OnPagesList of numbersThe pages to search, from 1. Empty or missing: every page.
BetweenXLeft, BetweenXRightNumberLeft and right edge of the area.
BetweenYTop, BetweenYBottomNumberTop and bottom edge of the area.
IsOnTheRightOfWordTextUse the right edge of this word as the left edge of the area.
IsOnTheLeftOfWordTextUse the left edge of this word as the right edge of the area.
IsBelowWordTextUse the bottom of this word as the top of the area.
IsAboveWordTextUse the top of this word as the bottom of the area.
MaxNoOfRowsPerTargetNumberJoin this many consecutive rows into one value, separated by a line break. Use it for values that span several lines, such as an address.
TakeFirstElementsNumberKeep only the first N values.
TakeLastElementsNumberKeep only the last N values.
RegExCaseSensitivePatternTextKeep only the values that match this regular expression.
RegExCaseInsensitivePatternTextThe same, ignoring upper and lower case.

Coordinates use the same system as Extract Text: PDF points from the bottom-left corner of the page, Y growing upwards. Read the coordinates you need from the Position of the words that Extract Text returns.

The images below show how the limits frame an area on a page.

How the area limits frame the values to extract, page 1

How the area limits frame the values to extract, page 2

How a value is built

  1. The words strictly inside the area are kept (a word must lie fully within the limits).
  2. They are grouped by row. Each row becomes one value: its words joined with spaces, left to right.
  3. MaxNoOfRowsPerTarget joins rows together.
  4. TakeFirstElements, then TakeLastElements, keep part of the values.
  5. Last, the two patterns filter what is left.

Example

The first page of a PDF reads Invoice INV-2026-001 / Customer: ACME Ltd / Total 250 EUR, the rows sitting at heights of about 780, 740 and 700 (from Extract Text). Area Configuration:

[
  { "MapToKey": "InvoiceNumber", "OnPages": [1],
    "BetweenXLeft": 0, "BetweenXRight": 600, "BetweenYTop": 800, "BetweenYBottom": 690,
    "RegExCaseSensitivePattern": "INV-\\d{4}-\\d{3}" },
  { "MapToKey": "Total", "OnPages": [1],
    "IsOnTheRightOfWord": "Total", "BetweenXRight": 600, "BetweenYTop": 720, "BetweenYBottom": 690 },
  { "MapToKey": "AllRows", "OnPages": [1],
    "BetweenXLeft": 0, "BetweenXRight": 600, "BetweenYTop": 800, "BetweenYBottom": 690,
    "MaxNoOfRowsPerTarget": 2 }
]

Mapped Areas:

[
  { "key": "InvoiceNumber", "page": 1, "values": ["Invoice INV-2026-001"] },
  { "key": "Total", "page": 1, "values": ["250 EUR"] },
  { "key": "AllRows", "page": 1, "values": ["Invoice INV-2026-001\nCustomer: ACME Ltd", "Total 250 EUR"] }
]

A pattern keeps or drops a whole row; it does not cut the matching part out of it (InvoiceNumber above). To keep only the number, narrow the area with IsOnTheRightOfWord, or extract the part afterwards with a regex action.

Good to know

  • Set all four sides. A side you leave out defaults to the outermost word on the page, and since the limits are exclusive, the outermost words themselves are then left out. For example, an area with only IsOnTheRightOfWord: "Total" on the page above returns ACME Ltd from the middle row, not 250 EUR: the top and bottom rows touch the default limits. Give explicit numbers (or a word) for every side.
  • Patterns are applied last. With TakeFirstElements: 1 and the pattern Total on the area above, the result is empty: the first row (Invoice INV-2026-001) is kept first, then dropped by the pattern.
  • Word limits (IsBelowWord and the others) match a single word, exactly and with the same case, for example Total or Customer: (with the colon). When the word appears more than once on the page, the occurrence nearest the page edge is used: the highest one for IsBelowWord, the lowest for IsAboveWord, the leftmost for IsOnTheRightOfWord, the rightmost for IsOnTheLeftOfWord.
  • You get one item per area for every page searched, with an empty values list where nothing matched. Use OnPages to avoid empty entries.
  • In the JSON, a backslash in a pattern must be doubled: write "\\d" for the regex \d.

On this page