# PDF Export

The KendoReact TreeList provides options for exporting to PDF.

## Getting Started

To enable the PDF export:

1. Install `kendo-react-pdf` package.

   ```sh
   npm i @progress/kendo-react-pdf
   ```

2. Import the TreeListPDFExport component in your React Application.

   ```jsx
   import { TreeListPDFExport } from '@progress/kendo-react-pdf';
   ```

3. Wrap the TreeList inside a TreeListPDFExport component.

4. Get the `ref` of the TreeListPDFExport.

5. Call the [`save`](https://www.telerik.com/kendo-react-ui/components/pdfprocessing/api/treelistpdfexport#save) function of the TreeListPDFExport component.

The following example demonstrates the basic implementation of the PDF export functionality of the TreeList.

[Demo Source](https://demos.telerik.com/kendo-react-ui/treelist/pdf/basic/func/source.txt)

## Configuration

You can control the PDF export configuration through the arguments that are passed to the [`save`](https://www.telerik.com/kendo-react-ui/components/pdfprocessing/api/treelistpdfexport#save) function of the KendoReact PDF Export component.

The TreeListPDFExport enables you to:

* [Export specific data](https://www.telerik.com/kendo-react-ui/components/treelist/pdf-export#exporting-specific-data)
* [Customizing Exported Columns](https://www.telerik.com/kendo-react-ui/components/treelist/pdf-export#customizing-exported-columns)

### Exporting Specific Data

To export specific data, pass the data to the [`save`](https://www.telerik.com/kendo-react-ui/components/pdfprocessing/api/treelistpdfexport#save) function of the TreeListPDFExport component. For example, if the TreeList has its paging enabled but you need to export all pages and all records expanded, pass the processed data to the `save` function.

[Demo Source](https://demos.telerik.com/kendo-react-ui/treelist/pdf/all-data-expanded/func/source.txt)

### Customizing Exported Columns

The TreeListPDFExport provides the ability to add or hide some of the columns in the exported PDF file. This is done by passing the columns that have to be exported to the [`save`](https://www.telerik.com/kendo-react-ui/components/pdfprocessing/api/treelistpdfexport#save) function.

[Demo Source](https://demos.telerik.com/kendo-react-ui/treelist/pdf/columns-modification/func/source.txt)

## Known Limitations

For full list of the PDF export known limitations refer to the [drawing package](https://www.telerik.com/kendo-react-ui/components/drawing/limitations-browser-support).

## Suggested Links

* [PDFExport Overview](https://www.telerik.com/kendo-react-ui/components/pdfprocessing)
* [API Reference of the TreeList Component](https://www.telerik.com/kendo-react-ui/components/treelist/api/treelistprops)
