pdf.paperSize String|Array
(default: "auto")
Specifies the paper size of the PDF document. The default auto
setting means that the paper size is determined by the content.
The size of the content in pixels will match the size of the output in points (1 pixel = 1/72 inch).
The supported values are:
- A predefined size -
A4
,A3
, and so on. - An array of two numbers which specify the width and height in points (1pt = 1/72in).
- An array of two strings which specify the width and height in units. The supported values are
mm
,cm
,in
, andpt
.
Example - setting a custom paper size
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
rows: [{
cells: [{ value: "A" }, { value: "B" }, { value: "C" }]
}, {
cells: [{ value: "1" }, { value: "2" }, { value: "3" }]
}, {
cells: [{ value: "4" }, { value: "5" }, { value: "6" }]
}]
}],
pdf: {
paperSize: ["100mm", "50mm"]
}
});
var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
spreadsheet.saveAsPDF();
</script>