pdf.paperSize String|Array (default: "auto")

Specifies the paper size of the PDF document. The default setting is auto and determines the paper size by content.

The size of the content in pixels matches the size of the output in points (1 pixel = 1/72 inch).

The supported values are:

  • A predefined size: A0-A10, B0-B10, C0-C10, Executive, Folio, Legal, Letter, Tabloid.
  • An array of two numbers specifying the width and height in points (1pt = 1/72in)
  • An array of two strings specifying the width and height in units. The supported units are mm, cm, in, and pt.

Example - setting custom paper size

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
      pdf: {
          paperSize: ["20cm", "20cm"]
      },
      dataSource: {
          data: [{ "items": [{ items: [{}] }] }],
          schema: { model: { children: "items" } }
      },
      layout: {
          type: "tree"
      }
  });

  var diagram = $("#diagram").getKendoDiagram();
  diagram.saveAsPDF();
</script>
In this article