pdf.margin Object

Sets the paper margins. The value has to be an object containing top, left, right, and bottom numbers which specify the paper margins. If numbers are passed, they are assumed to be in points (pt). By using strings, you can specify the units. The supported units are mm, cm, in, and pt (default).

Example - setting the PDF document margins

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
      pdf: {
          margin: {
              left: 10,
              right: "10pt",
              top: "10mm",
              bottom: "1in"
          }
      },
      dataSource: {
          data: [{ "items": [{ items: [{}] }] }],
          schema: { model: { children: "items" } }
      },
      layout: {
          type: "tree"
      }
  });

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

pdf.margin.bottom Number|String (default: 0)

The bottom margin. Numbers are assumed to be in pt units.

pdf.margin.left Number|String (default: 0)

The left margin. Numbers are assumed to be in pt units.

pdf.margin.right Number|String (default: 0)

The right margin. Numbers are assumed to be in pt units.

pdf.margin.top Number|String (default: 0)

The top margin. Numbers are assumed to be in pt units.

In this article