pdf.fitWidth Boolean (default: false)

Indicates whether to fit the content of the Spreadsheet to the width of the page.

Example - fitting the Spreadsheet to the page width

<div id="spreadsheet"></div>
<script>
    $("#spreadsheet").kendoSpreadsheet({
        sheets: [{
            rows: [{
                cells: [
                    { value: "A" }, { value: "B" }, { value: "C" },
                    { value: "1" }, { value: "2" }, { value: "3" },
                    { value: "4" }, { value: "5" }, { value: "6" },
                    { value: "7" }, { value: "8" }, { value: "9" }
                ]
            }]
        }],
        pdf: {
            landscape: false,
            fitWidth: true
        }
    });

    var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
    spreadsheet.saveAsPDF();
</script>
In this article
Not finding the help you need? Improve this article