这是Kendo关于如何将DOM导出为pdf的示例代码
<div id="calendar"></div>
<script>
$("#calendar").kendoCalendar();
var draw = kendo.drawing;
draw.drawDOM($("#calendar"))
.then(function(root) {
// Chaining the promise via then
return draw.exportPDF(root, {
paperSize: "A4",
landscape: true
});
})
.done(function(data) {
// Here 'data' is the Base64-encoded PDF file
kendo.saveAs({
dataURI: data,
fileName: "calendar.pdf"
});
});
</script>