New to Kendo UI for jQuery? Start a free 30-day trial

Pdf.margin

configuration

Specifies the margins of the page (numbers or strings with units). Supported units are "mm", "cm", "in" and "pt" (default).

<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
    toolbar: ["pdf"],
    pdf: {
        margin: {
            left: 10,
            right: "10pt",
            top: "10mm",
            bottom: "1in"
        }
    },
    dataSource: [
        {
            id: 1,
            orderId: 0,
            parentId: null,
            title: "Task1",
            start: new Date("2014/6/17 9:00"),
            end: new Date("2014/6/17 11:00")
        }
    ]
});
</script>

pdf.margin.bottom

Number|String

The bottom margin. Numbers are considered as "pt" units.

Default: 0

<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
    dataSource: [
        { id: 1, title: "Task 1", start: new Date("2023/1/1"), end: new Date("2023/1/5") }
    ],
    toolbar: ["pdf"],
    pdf: {
        margin: {
            bottom: 20
        }
    }
});
</script>

pdf.margin.left

Number|String

The left margin. Numbers are considered as "pt" units.

Default: 0

<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
    dataSource: [
        { id: 1, title: "Task 1", start: new Date("2023/1/1"), end: new Date("2023/1/5") }
    ],
    toolbar: ["pdf"],
    pdf: {
        margin: {
            left: 15
        }
    }
});
</script>

pdf.margin.right

Number|String

The right margin. Numbers are considered as "pt" units.

Default: 0

<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
    dataSource: [
        { id: 1, title: "Task 1", start: new Date("2023/1/1"), end: new Date("2023/1/5") }
    ],
    toolbar: ["pdf"],
    pdf: {
        margin: {
            right: 15
        }
    }
});
</script>

pdf.margin.top

Number|String

The top margin. Numbers are considered as "pt" units.

Default: 0

<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
    dataSource: [
        { id: 1, title: "Task 1", start: new Date("2023/1/1"), end: new Date("2023/1/5") }
    ],
    toolbar: ["pdf"],
    pdf: {
        margin: {
            top: 25
        }
    }
});
</script>