saveAsPDF

Saves the diagram content as PDF document.

Returns

Promise A promise that will be resolved when the export completes.

Example - Exporting a diagram to a PDF document

<button id="exportBtn">Save as PDF</button>
<div id="diagram"></div>
<script>
  $("#exportBtn").on("click", function(){
    var diagram = $("#diagram").getKendoDiagram();
    diagram.saveAsPDF();
  });
  $("#diagram").kendoDiagram({
    shapes:[
      {
        id:"1",
        content:{
          text: "State 1"
        },
        x: 20,
        y: 20
      },
      {
        id:"2",
        content: {
          text: "State 2"
        },
        x: 160,
        y: 20
      }
    ],
    connections:[
      {
        from: "1",
        to: "2"
      }
    ]
  });
</script>
In this article