# Export Documents

## Content

FlexViewer supports exporting reports to different file formats for sharing, editing, data analysis, and archiving. The available export formats depend on the document source loaded in FlexViewer and the supported platform.
The **Export** option opens the export dialog to select an export format and configure the corresponding export settings.
![FlexViewer exporting a report by selecting an export format, configuring export options, and specifying the output destination.](https://cdn.mescius.io/document-site-files/images/4e85e507-742e-4a29-b3fe-f23b37c29164/mauiflexviewerexportreport-20261016.8c6e0f.gif)
FlexViewer supports the following export formats:

* Adobe PDF (.pdf)
* HTML Document (.html)
* Open XML Word (.docx)
* RTF Document (.rtf)
* Open XML Excel (.xlsx)
* Microsoft Excel (.xls)
* Comma Separated Values (.csv)
* Image formats:
    * BMP (.bmp)
    * PNG (.png)
    * JPEG (.jpg)
    * GIF (.gif)

## Export Options

The export dialog provides format-specific options based on the selected export format.

### General

The **General** options configure PDF/A compatibility, compression, and document outlines.

### Document Restriction

The **Document Restriction** options configure content copying and extraction, annotation editing, and printing permissions for PDF documents.

### Password Security

The **Password Security** options configure owner and user passwords and the encryption level for PDF documents.
The following encryption levels are available:

* NotPermit
* Standard40
* Standard128
* Aes128

### Output Range

The **Output Range** options specify the pages included in the exported document. The available options include all pages, a specific page range, and an inverted page range.

### Document Info

The **Document Info** options specify metadata for the exported document, including **Title**, **Author**, **Subject**, **Creator**, and **Keywords**. Additional fields include Operator, Manager, Company, Comment, and timestamps.

### Export To

The **Export To** option specifies the destination and format for the exported document.

## Export Using FlexViewer in Code

FlexViewer supports programmatic export through the export providers available for the current document source. The `GetExportProviders` method returns the supported export providers.
The following code retrieves the CSV export provider and exports the current document:

```auto
var providers = flexViewer.Pane.GetExportProviders();

var csvProvider = providers.FirstOrDefault(
    p => p.DefaultExtension == "csv");

if (csvProvider != null)
{
    var exporter = flexViewer.Pane.CreateExporter(csvProvider);
    await flexViewer.Pane.ExportDocumentAsync(
        csvProvider,
        exporter);
}
```

## Limitations

* Export format availability varies by document source and platform.
* Multi-page exports to BMP, PNG, JPEG, or GIF produce a ZIP archive containing individual page images.
* Password security and document restriction options apply only to PDF export.
* CSV-specific export options require further validation before documentation.