> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Region

> The field region. It is an area on the image that contains the text for a specific field. A field region is constructed using one or more rectangles.

`Region` represents a field region on a document image. A region is built from one or more rectangles.

## Properties

| Name           | Type                                                                                    | Access    | Description                                      |
| :------------- | :-------------------------------------------------------------------------------------- | :-------- | :----------------------------------------------- |
| **PageId**     | string                                                                                  | Read-only | Identifier of the page that contains the region. |
| **Rectangles** | [Rectangle](/vantage/documentation/skill-designer/process/custom-activity/rectangle)\[] | Read-only | The rectangle set used to make the region.       |

## Methods

### AddRectangle

```javascript theme={null}
bool AddRectangle(number topLeftX, number topLeftY, number bottomRightX, number bottomRightY);
```

Adds a rectangle to the region using the four boundary coordinates. Returns `true` if the rectangle was added.

### RemoveRectangle

```javascript theme={null}
bool RemoveRectangle(Rectangle rectangle);
```

Removes the specified rectangle from the region. Returns `true` if the rectangle was removed.

### RemoveAll

```javascript theme={null}
void RemoveAll();
```

Removes all rectangles from the region.

<div id="collection">
  ## RegionsCollection
</div>

A read-only collection of `Region` objects for a single field.

### Methods

#### AddRegion

```javascript theme={null}
Region AddRegion(number pageIndex);
```

Adds a new region to the field on the specified page. Returns the created `Region`.

#### RemoveRegion

```javascript theme={null}
void RemoveRegion(Region region);
```

Removes the specified region.

#### RemoveAll

```javascript theme={null}
void RemoveAll();
```

Removes all regions from the current field.

## Related topics

<CardGroup cols={3}>
  <Card title="Field" icon="font" href="/vantage/documentation/skill-designer/process/custom-activity/field">
    Provides access to the field value and its properties.
  </Card>

  <Card title="Rectangle" icon="square-dashed" href="/vantage/documentation/skill-designer/process/custom-activity/rectangle">
    Top-left and bottom-right coordinates of a rectangular page area.
  </Card>

  <Card title="Object model" icon="diagram-project" href="/vantage/documentation/skill-designer/process/custom-activity/object-model">
    Full JavaScript object reference for Custom activity scripts.
  </Card>
</CardGroup>
