---
title: "Disable & remove download button in MAUI PDF viewer | Nutrient"
canonical_url: "https://www.nutrient.io/guides/maui/user-interface/main-toolbar/download-export-button/"
md_url: "https://www.nutrient.io/guides/maui/user-interface/main-toolbar/download-export-button.md"
last_updated: "2026-06-09T10:26:34.608Z"
description: "The built-in download button can be activated by adding it to MainToolbar.ToolbarItems: for Nutrient MAUI SDK."
---

# Customizing download/export buttons in our PDF viewer

The built-in download button can be activated by adding it to [`MainToolbar.ToolbarItems`](https://www.nutrient.io/api/maui/sdk/PSPDFKit.Sdk.Models.Toolbar.MainToolbar.html#ToolbarItems):

```csharp

PSPDFKitController.MainToolbar.ToolbarItems.Add(new ExportPDFButton());

```

If you need more fine-grained control over the download operation, you can easily add your own download button to Nutrient MAUI SDK with [`IDocument.ExportDocumentAsync`](https://www.nutrient.io/api/maui/api/PSPDFKit.Api.IDocument.html#PSPDFKit_Api_IDocument_ExportDocumentAsync_PSPDFKit_Api_IExportConfiguration_) and the possibility of [customizing the toolbar](https://www.nutrient.io/guides/maui/user-interface/main-toolbar/customize-existing-tools.md):

```csharp

var downloadButton = new CustomMainToolbarButton("download-button")
{
    Icon = "download.svg",
    Tooltip = "Download"
};

downloadButton.Clicked += async (s, e) =>
{
    var exportedDocumentContent = await _document.ExportDocumentAsync(
      _document.CreateExportConfiguration());
    var result = await FileSaver.Default.SaveAsync(
        "download.pdf", new MemoryStream(exportedDocumentContent), CancellationToken.None);
};

PSPDFKitController.MainToolbar.ToolbarItems.Add(downloadButton);

```

## Hiding the download button

You can remove the download button from the toolbar by getting the array of current toolbar items via [`MainToolbar.ToolbarItems`](https://www.nutrient.io/api/maui/sdk/PSPDFKit.Sdk.Models.Toolbar.MainToolbar.html#ToolbarItems) and removing the item from the collection:

```csharp

var downloadButton = PSPDFKitController.MainToolbar.ToolbarItems.FirstOrDefault(item => item is ExportPDFButton);
if (downloadButton == null)
{
    return;
}

PSPDFKitController.MainToolbar.ToolbarItems.Remove(downloadButton);

```
---

## Related pages

- [Activate or deactivate tools in our viewer toolbar](/guides/maui/user-interface/main-toolbar/activate-or-deactivate-tools.md)
- [Create custom tools for MAUI PDF viewer](/guides/maui/user-interface/main-toolbar/create-a-new-tool.md)
- [Customizing existing tools in our viewer toolbar](/guides/maui/user-interface/main-toolbar/customize-existing-tools.md)
- [Customizing the dropdown navigation in our viewer toolbar](/guides/maui/user-interface/main-toolbar/dropdown-groups.md)
- [Adding page labels to navigation in our viewer](/guides/maui/user-interface/main-toolbar/page-label-navigation.md)
- [Hiding the toolbar in our PDF viewer](/guides/maui/user-interface/main-toolbar/hide-the-toolbar.md)
- [Adjust the placement of the toolbar in our viewer](/guides/maui/user-interface/main-toolbar/placement.md)
- [Customizing responsive navigation in our viewer toolbar](/guides/maui/user-interface/main-toolbar/responsive-groups.md)
- [Removing a tool from the toolbar in our MAUI viewer](/guides/maui/user-interface/main-toolbar/remove-a-tool.md)
- [Rearrange tools in our viewer toolbar](/guides/maui/user-interface/main-toolbar/rearrange.md)

