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

# IDocumentDetect

It is implemented by [`DocuemntDetect`](https://www.dynamsoft.com/document-viewer/docs/api/class/advanced/documentdetect.md) Class.

## Members

### detect()

**Syntax**

```typescript
detect(image: VImageData, config?: DocumentDetectConfig): Promise<DocumentDetectResult>;
```

**Parameters**

`image`: The image which is used to detect boundaries. Please refer to [`VImageData`](https://www.dynamsoft.com/document-viewer/docs/api/interface/vimagedata.md).

`config`: The configuration of document detect. Please refer to [`DocumentDetectConfig`](https://www.dynamsoft.com/document-viewer/docs/api/interface/documentdetectconfig.md).

**Return Value**

A promise resolving to an [`DocumentDetectResult`](https://www.dynamsoft.com/document-viewer/docs/api/interface/documentdetectresult.md) object that contains the detected result.

### destory()

**Syntax**

```typescript
destory(): void;
```
