# Settings

`PdfFormatProvider` allows you to export PDF documents. Several settings allow you to customize the export.

## PdfExportSettings

`PdfExportSettings` controls how a `Workbook` is exported to PDF. Use `PdfExportSettings` to specify the following properties:

| Property              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ExportWhat`          | Enumeration specifying whether to export the Active Sheet, the Entire Workbook, or the current Selection.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `IgnorePrintArea`     | Boolean value indicating whether to ignore print area when exporting worksheets.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `IncludeHiddenSheets` | Boolean value indicating whether to include the hidden sheets or to skip them. Default value is `false`.                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `SelectedRanges`      | A list of ranges specifying which areas of the active worksheet to export. Use the `ExportWhat.Selection` option to export exactly this `SelectedRanges` from the current worksheet, ignoring `PrintArea` and `PageBreaks` from `WorksheetPageSetup`.                                                                                                                                                                                                                                                                                                 |
| `PdfFileSettings`     | A property of type `PdfExportSettings` related to the [RadPdfProcessing library](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/overview). Allows you to control the image quality, encryption, compliance level, and other PDF format-related properties. More information is available in the [export settings article for RadPdfProcessing](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/settings). |
| `ChartRenderer`       | A property of type [IPdfChartRenderer](https://docs.telerik.com/devtools/document-processing/api/telerik.windows.documents.spreadsheet.formatproviders.pdf.export.ipdfchartrenderer) that gets or sets the renderer used to render charts. Not relevant for the .NET Standard version of the Telerik Document Processing libraries. Read more in the [Export Chart to PDF](https://www.telerik.com/document-processing-libraries/documentation/libraries/radspreadprocessing/features/charts/pdf-export) article.                                     |

The following example shows how to export the Entire Workbook without ignoring the `PrintArea` property in all worksheets.

**Example 1: Export Entire Workbook**

```C#
Telerik.Documents.Spreadsheet.FormatProviders.Pdf.PdfFormatProvider provider =
				new Telerik.Documents.Spreadsheet.FormatProviders.Pdf.PdfFormatProvider();
provider.ExportSettings = new Telerik.Documents.Spreadsheet.FormatProviders.Pdf.Export.PdfExportSettings(ExportWhat.EntireWorkbook, false);
```

The following example shows how to export only two selected ranges from the active worksheet, ignoring print areas and page breaks.

**Example 2: Export two explicit cell ranges from the active worksheet**

```C#
CellRange[] rangesToExport = new CellRange[]
	{
		new CellRange(2, 3, 10, 15),
		new CellRange(4, 5, 8, 20)
	};

Telerik.Documents.Spreadsheet.FormatProviders.Pdf.PdfFormatProvider provider = new Telerik.Documents.Spreadsheet.FormatProviders.Pdf.PdfFormatProvider();
provider.ExportSettings = new Telerik.Documents.Spreadsheet.FormatProviders.Pdf.Export.PdfExportSettings(rangesToExport);
```

> To specify file export settings to the `PdfFormatProvider`, you need to add both the Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export and Telerik.Windows.Documents.Flow\.FormatProviders.Pdf.Export namespaces. In Example 3 the *Fixed* alias corresponds to the `Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export` namespace.

Another export option is to specify settings specific to the PDF format for the exported document. The following example demonstrates how to use the `PdfFileSettings` property to export a PDF/A-compliant document.

**Example 3: Configure PdfFileSettings to export a PDF/A-2b compliant document**

```C#
Telerik.Documents.Spreadsheet.FormatProviders.Pdf.PdfFormatProvider provider = new Telerik.Documents.Spreadsheet.FormatProviders.Pdf.PdfFormatProvider();

Telerik.Documents.Fixed.FormatProviders.Pdf.Export.PdfExportSettings fileSettings = new Telerik.Documents.Fixed.FormatProviders.Pdf.Export.PdfExportSettings();
fileSettings.ComplianceLevel = Telerik.Documents.Fixed.FormatProviders.Pdf.Export.PdfComplianceLevel.PdfA2B;

provider.ExportSettings.PdfFileSettings = fileSettings;
```

## See Also

* [PdfProcessing Export Settings](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/settings)
* [PdfProcessing PDF/A Compliancy](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/concepts/comply-with-pdfa-standard)
