New to Kendo UI for jQueryStart a free 30-day trial

ExportPDF

methods

Exports the diagram content 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.

Returns:Promise

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

<button id="exportBtn">Export</button>
<div id="diagram"></div>
<script>
  $("#exportBtn").on("click", function(){
    var diagram = $("#diagram").getKendoDiagram();
    diagram.exportPDF({
      paperSize: "A4",
      landscape: true
    }).done(function(data) {
      kendo.saveAs({
        dataURI: data,
        fileName: "diagram.pdf"
      });
    });
  });
  $("#diagram").kendoDiagram({
    dataSource: {
      data: [{ "items": [{ items: [{}] }] }],
      schema: { model: { children: "items" } }
    },
    layout: {
      type: "tree"
    }
  });
</script>
Not finding the help you need?
Contact Support