# Interface: DocumentState

[Mobile Document Scanner API Reference](../index.md) / DocumentState

# Interface: DocumentState

Defined in: [src/results.ts:153](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/results.ts#L153)

The state of the document after a change: the number of its pages, the current
page, and what undo and redo can do, with this change in the history.

## Properties

### currentIndex

> `readonly` **currentIndex**: `number`

Defined in: [src/results.ts:160](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/results.ts#L160)

The index of the page that the edit screen shows, or else of the newest page.
`-1` while the document is empty.

***

### pageCount

> `readonly` **pageCount**: `number`

Defined in: [src/results.ts:155](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/results.ts#L155)

The number of pages in the document.

***

### redoCount

> `readonly` **redoCount**: `number`

Defined in: [src/results.ts:164](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/results.ts#L164)

How many changes redo can make again.

***

### undoCount

> `readonly` **undoCount**: `number`

Defined in: [src/results.ts:162](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/results.ts#L162)

How many changes undo can take back.
