pdf.marginObject
Specifies the margins of the page and accepts numbers or strings with units.
The supported units are:
mmcmin- (Default)
pt
Example - setting the margins
<div id="treelist"></div>
<script>
$("#treelist").kendoTreeList({
toolbar: ["pdf"],
columns: [
{ field: "FirstName", title: "First Name" },
{ field: "LastName", title: "Last Name", width: 160 },
{ field: "Position" }
],
pdf: {
margin: {
left: 10,
right: "10pt",
top: "10mm",
bottom: "1in"
}
},
dataSource: {
transport: {
read: {
url: "https://demos.telerik.com/service/v2/core/EmployeeDirectory/All"
}
},
schema: {
model: {
id: "EmployeeID",
fields: {
parentId: { field: "ReportsTo", nullable: true },
EmployeeID: { field: "EmployeeId", type: "number" },
Extension: { field: "Extension", type: "number" }
},
expanded: true
}
}
}
});
</script>
pdf.margin.bottomNumber|String(default: 0)
The bottom margin. Numbers are considered as pt units.
Example
<div id="treelist"></div>
<script>
$("#treelist").kendoTreeList({
columns: [
{ field: "Name" },
{ field: "Position" }
],
dataSource: [
{ id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
{ id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
],
pdf: {
margin: {
bottom: 20
}
}
});
</script>
pdf.margin.leftNumber|String(default: 0)
The left margin. Numbers are considered as pt units.
Example
<div id="treelist"></div>
<script>
$("#treelist").kendoTreeList({
columns: [
{ field: "Name" },
{ field: "Position" }
],
dataSource: [
{ id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
{ id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
],
pdf: {
margin: {
left: 25
}
}
});
</script>
pdf.margin.rightNumber|String(default: 0)
The right margin. Numbers are considered as pt units.
Example
<div id="treelist"></div>
<script>
$("#treelist").kendoTreeList({
columns: [
{ field: "Name" },
{ field: "Position" }
],
dataSource: [
{ id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
{ id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
],
pdf: {
margin: {
right: 25
}
}
});
</script>
pdf.margin.topNumber|String(default: 0)
The top margin. Numbers are considered as pt units.
Example
<div id="treelist"></div>
<script>
$("#treelist").kendoTreeList({
columns: [
{ field: "Name" },
{ field: "Position" }
],
dataSource: [
{ id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
{ id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
],
pdf: {
margin: {
top: 25
}
}
});
</script>
In this article