# PDFViewer.canUndo()

```ts
canUndo(): boolean
```

Returns `true` if undo is available. For buttons that follow the stack, listen to [documentChanged](https://kernstra.com/docs/web-sdk/api/events#ev-documentchanged), which carries `canUndo` and `canRedo`.

- Kind: method
- Since: 1.0.0

Returns `boolean`

Part of [PDFViewer](https://kernstra.com/docs/web-sdk/api/pdfviewer) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/pdfviewer/canundo
