saveAsPDF

Initiates the PDF export and returns a promise. Also triggers the pdfExport event.

Calling this method may trip the built-in browser popup blocker. To avoid that, call this method as a response to an end-user action (foe examlple, a button click).

Returns

Promise - A promise that will be resolved when the export completes. The same promise is available in the pdfExport event arguments.

Example - manually initiating the PDF export

<button id="export">Export to PDF</button>
<div id="treeList"></div>
<script>
    $("#treeList").kendoTreeList({
        columns: [ "id", "name" ],
        dataSource: [
            { id: 1, parentId: null, name: "Jane Doe", age: 30 },
            { id: 2, parentId: 1, name: "John Doe", age: 33 }
        ]
    });
    $("#export").click(function(e) {
        var treeList = $("#treeList").data("kendoTreeList");
        treeList.saveAsPDF();
    });
</script>
In this article