Using the example from this page: https://docs.telerik.com/kendo-ui/framework/pdf/page-templates
My goal is to produce a PDF from the webpage with a header and footer as shown on the page above, and to be able to save the PDF to a location.
When using this method, the template header and footer display correctly.
kendo.drawing.drawDOM("#grid", { paperSize: "A4", margin: "3cm", template: $("#page-template").html() //WORKS }).then(function(group){ kendo.drawing.pdf.saveAs(group, "filename.pdf"); });
However, when using this method, the "template" is ignored. I have tried placing the properties in the "saveAs" object, but this didn't work either.
kendo.drawing.drawDOM("#grid", { }).then(function(group){ return kendo.drawing.exportPDF(group, { paperSize: "A4", margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" }, template: $("#page-template").html() //IGNORED }); }) .done(function (data) { kendo.saveAs({ dataURI: data, fileName: "filename.pdf", //proxyURL: "myurl/Test/" }); });
How can I get the template to show the header and footers with the 2nd method?
Or does the "kendo.drawing.pdf.saveAs" have a "proxyURL" property?