PDF Export
The data of the Native TreeList component can be easily exported to a PDF file. Depending on the requirements of the targeted scenario, you can modify the exported data the way you need it. The current article covers three popular data export scenarios:
- Export of the visible TreeList data
- Export of all items loaded in the TreeList data
- Export the data from selected TreeList columns
Getting Started
To enable the PDF export:
-
Install
kendo-vue-pdf
package.shnpm install @progress/kendo-vue-pdf @progress/kendo-licensing
-
Import the TreeListPDFExport component in your Vue Application.
jsximport { TreeListPDFExport } from '@progress/kendo-vue-pdf';
-
Wrap the TreeList inside a TreeListPDFExport component.
-
Define a
ref
of the TreeListPDFExport. -
Call the
save
function of the TreeListPDFExport component.
The following example demonstrates the basic implementation of the PDF export functionality of the TreeList.
Exporting All the Data loaded in the TreeList
To export specific TreeList data, pass the data to the 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.
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
function.
Known Limitations
For full list of the PDF export known limitations refer to the drawing package.