---
layout: default-layout
needAutoGenerateSidebar: true
needGenerateH3Content: true
noTitleIndex: true
title: Dynamsoft Document Viewer API Reference - Interface Rect
keywords: Documentation, Dynamsoft Document Viewer, API Reference, Interface Rect
breadcrumbText: Interface Rect
description: Dynamsoft Document Viewer Documentation API Reference Interface Rect Page
permalink: /api/interface/rect.html
---

# Rect

## Syntax

```typescript
interface Rect {
    left: number;
    top: number;
    width: number;
    height: number;
}
```

## Attributes

### left

The x-coordinate of the upper-left corner of the area.

### top

The y-coordinate of the upper-left corner of the area.

### width 

The width of the rectangle area. The unit is point.

### height

The height of the rectangle area. The unit is point.

![Rect](/document-viewer/docs/assets/imgs/rect.png)

## Related

- [`crop()`](https://www.dynamsoft.com/document-viewer/docs/api/class/editviewer.md#crop)
- [`getCropRect()`](https://www.dynamsoft.com/document-viewer/docs/api/class/editviewer.md#getcroprect)
- [`setCropRect()`](https://www.dynamsoft.com/document-viewer/docs/api/class/editviewer.md#setcroprect)