Edit this page

exportPDF

Exports the chart as a PDF file. The result can be saved using kendo.saveAs.

The export operation is asynchronous and returns a promise. The promise will be resolved with a PDF file encoded as a Data URI.

Parameters

options kendo.drawing.PDFOptions (optional)Parameters for the exported PDF file.

ReturnsPromise A promise that will be resolved with a PDF file encoded as a Data URI.

Example - Exporting a chart to a PDF file

<div id="chart"></div>
<script>
    $("#chart").kendoChart({
        transitions: false,
        series: [{
            type: "column",
            data: [1, 2, 3]
        }, {
            type: "line",
            data: [2, 1, 3]
        }, {
            type: "area",
            data: [3, 1, 2]
        }]
    });

    var chart = $("#chart").getKendoChart();
    chart.exportPDF({ paperSize: "A5", landscape: true }).done(function(data) {
        kendo.saveAs({
            dataURI: data,
            fileName: "chart.pdf"
        });
    });
</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