---
title: "Save PDF document to an array buffer in MAUI | Nutrient"
canonical_url: "https://www.nutrient.io/guides/maui/save-a-document/to-arraybuffer/"
md_url: "https://www.nutrient.io/guides/maui/save-a-document/to-arraybuffer.md"
last_updated: "2026-06-09T10:30:03.950Z"
description: "Exporting a PDF to a byte[] can be done with a single API call to .ExportDocumentAsync(): for Nutrient MAUI SDK."
---

# Save a PDF document to an array buffer in MAUI

Exporting a PDF to a `byte[]` can be done with a single API call to [`<IDocument>.ExportDocumentAsync()`](https://www.nutrient.io/api/maui/api/PSPDFKit.Api.IDocument.html#PSPDFKit_Api_IDocument_ExportDocumentAsync_PSPDFKit_Api_IExportConfiguration_):

```csharp

try
{
    var exportConfiguration = _document.CreateExportConfiguration();
    // Update the configuration here.

    var exportedDocumentAsArrayBuffer = await _document.ExportDocumentAsync(exportConfiguration);
}
catch (Exception ex)
{
    // Handle the exception.
}

```

The resolved `byte[]` can be then handled as desired. For example, you can [send it to your server](https://www.nutrient.io/guides/maui/save-a-document/to-remote-server.md) or [save it to local storage](https://www.nutrient.io/guides/maui/save-a-document/to-local-storage.md).

For more control over exporting documents, use [`IExportConfiguration`](https://www.nutrient.io/guides/maui/save-a-document/export-configuration/). If you pass `null` instead, the default configuration will be used:

```csharp

var exportOptions = _document.CreateExportConfiguration();
{
    ExcludeAnnotations = true,
    ExportForPrinting = true,
    ExportIncrementally = false,
    Flatten = true,
};

var exportedDocumentContent = await _document.ExportDocumentAsync(exportConfiguration);

```
---

## Related pages

- [Save a PDF document in MAUI](/guides/maui/save-a-document.md)
- [Exporting a PDF in MAUI](/guides/maui/save-a-document/export-configuration.md)
- [Save a PDF to local storage in MAUI](/guides/maui/save-a-document/to-local-storage.md)
- [Save a PDF to a remote server in MAUI](/guides/maui/save-a-document/to-remote-server.md)

