# callbacks.onDownload

Part of [Callbacks](https://kernstra.com/docs/web-sdk/config/callbacks) in the Kernstra Web SDK 1.0.0 configuration reference.

- Type: `() => void`
- Page: https://kernstra.com/docs/web-sdk/config/callbacks/ondownload

Takes over the toolbar Download button (after [`forms.validateRequired`](https://kernstra.com/docs/web-sdk/config/forms/validaterequired)). When set, the SDK's Download dialog and flow do not run; your function does — get the bytes from [`viewer.createExporter()`](https://kernstra.com/docs/web-sdk/api/pdfviewer/createexporter).

Web page: https://kernstra.com/docs/web-sdk/config/callbacks/ondownload
