Sensible

The Sensible Developer Hub

Welcome to the Sensible developer hub. You'll find comprehensive guides and documentation to help you start working with Sensible as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Use the Region method to grab data in a rectangular region, defined in inches. The region omits lines that only partly fall inside the region.

In general, use this method when you want to grab data from an area whose formatting doesn't exactly fit other SenseML methods, such as the Box method. For example, you can use this method when a Label method doesn't work because the anchor is separated by too much whitespace from the data to grab.

Parameters

Note: For the full list of parameters available for this method, see Global parameters for methods. The following table only shows parameters most relevant to or specific to this method.

idvaluedescription
id (required)region
start (required)above, below, left, rightA Direction specifying where to start relative to the anchor. right  specifies a start point at the middle of the right edge of the anchor, below specifies a start point at the middle of the bottom edge of the anchor, and so forth.
offsetX (required)numberThe offset in inches along the X axis:
- from the point defined in the Start parameter
- to the top left corner of the region
You can use interactive visual feedback in the Sensible app to determine this number.
offsetY (required)numberThe offset in inches along the Y axis:
- from the point defined in the Start parameter
- to the top left corner of the region
You can use interactive visual feedback in the Sensible app to determine this number.
width (required)numberThe width in inches of the extraction region. 
You can use interactive visual feedback in the Sensible app to determine this number.
height (required)numberThe height in inches of the extraction region. 
You can use interactive visual feedback in the Sensible app to determine this number.
isAbsoluteOffsetboolean. default: falseMakes the offsets relative to the 0,0 origin at the top left of the page rather than to the Start parameter.

Examples

The following image shows extracting a social security number from a W-9 form by defining a region to grab:

You can try out this example yourself in the Sensible app using the following downloadable PDF and config:

Example PDF for regionDownload link

This example uses the following config:

{
  "fields": [
    {
      "id": "SSN",
      "anchor": {
        "match": {
          "type": "equals",
          "text": "Social security number",
          "isCaseSensitive": true
        }
      },
      "method": {
        "id": "region",
        "start": "below",
        "width": 2.15,
        "height": 0.25,
        "offsetX": -0.55,
        "offsetY": 0.1
      }
    }
  ]
}

Notes

If the region that you want to grab is a box that is bordered with dark lines, you can use the Box method instead of the Region method.

Updated 11 days ago


Region


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.