### Export FlexGrid to a file

This sample shows how to export a FlexGrid having row groups to a PDF file using the export method.

FlexGridPdfConverter provides export class method to export FlexGrid to a file.

The method takes the following arguments:

- The FlexGrid instance to export.
- Name of the PDF file to which grid is to be exported.
- The export settings. Along with other settings, it provides the documentOptions property that refers to the PdfDocument constructor options.

For example, the following code exports the FlexGrid to a file with name "FlexGrid.pdf" and declares that the document should have A4 page size:

    wijmo.grid.pdf.FlexGridPdfConverter.export(flexGrid, "FlexGrid.pdf", {
        documentOptions: {
            pageSettings: {
                size: wijmo.pdf.PdfPageSize.A4
            }
        }
    });

You can change the following export settings using the menus below:

- scaleMode: Determines how the FlexGrid content should be scaled in order to fit the page.
- orientation: Determines the orientation of pages.
- exportMode: Determines whether the whole grid or a section should be exported.

In addition, the following export settings are configured when calling the export method in this sample:

- documentOptions.pageSettings.header and documentOptions.pageSettings.footer: To provide automatic page numbering.
- documentOptions.info: To provide document information.
- styles: To set up appearance of the FlexGrid being exported.

#### Export Settings

- ActualSize PageWidth SinglePage
- Portrait Landscape
- All Selection