# Editor.DownloadButton
> The PDF / PNG export trigger. Drives the bundled jspdf pipeline (or your custom backend) with an AbortController for cancellation.
Source: https://docs.docmosaic.com/docs/primitives/download-button
`Editor.DownloadButton` is the export trigger. It calls `usePdfGeneration` under the hood - wrapping `generatePDF` from `@docmosaic/core` with an `AbortController` so the export can be cancelled mid-flight.
## Usage
```tsx
```
The bundled `GenerationProgress` overlay shows progress 0 → 1 across the optimization (30%) and render (70%) stages.
## Examples
### Export PNG instead of PDF
```tsx
```
### Custom filename
```tsx
```
### Cancel mid-flight
Wire your own button to dispatch `actions.cancelGeneration()`:
```tsx
import { useEditor } from '@docmosaic/react';
function CancelButton() {
const { ui, actions } = useEditor();
if (!ui.isGenerating) return null;
return ;
}
```
### Custom PDF backend
Override the bundled pipeline at the root.
```tsx
```
See the [custom PDF backend recipe](/docs/recipes/custom-pdf-backend) for the full example.
## API Reference
## Related
- [GenerationProgress](/docs/primitives/generation-progress)
- [FileSizeBadge](/docs/primitives/file-size-badge)
- [PrintButton](/docs/primitives/print-button)
- [usePdfGeneration hook](/docs/reference/hooks)