I'm using .paperSize("auto") for my Export to PDF, and I want using the .TemplateId("templateName") so that I could include a header when I export to PDF. Using paperSize("auto") will not apply the template. How do I use paperSize("auto") and also include a header? Any help with be appreciated
<script type="x/kendo-template" id="page-template">
<div class="page-template">
<div class="header">
#=getDllValueForPrint()#
</div>
<div class="footer">
@*<div style="float: right">Page #: pageNum # of #: totalPages #</div>*@
</div>
</div>
</script>
.Pdf(pdf => pdf
.FileName("Customer Orders Summary (Yearly).pdf")
.AllPages()
.PaperSize("auto")
.Margin("2cm", "1cm", "1cm", "1cm")
.Landscape()
.TemplateId("page-template")
function getDllValueForPrint() {
var CustomerID = $("#CustomerID").data('kendoDropDownList');
var selectedCustomerName = CustomerID.text();
return selectedCustomerName;
}