Edit this page

saveAsPDF

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

Calling this method may trip the built-in browser pop-up blocker. To avoid that, call this method as a response to an end-user action, e.g. a button click.

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

Example - manually initiate PDF export

<button id="export">Export to PDF</button>
<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
    dataSource: [
        {
            id: 1,
            orderId: 0,
            parentId: null,
            title: "Task1",
            start: new Date("2014/6/17 9:00"),
            end: new Date("2014/6/17 11:00")
        }
    ]
});

$("#export").click(function(e) {
    var gantt = $("#gantt").data("kendoGantt");
    gantt.saveAsPDF();
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy