Telerik Export to PDF paperSize auto with template?
1 Answer 16 Views
Top achievements
Rank 1
Andrew asked on 06 May 2021, 10:00 AM

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">
            <div class="footer">
                @*<div style="float: right">Page #: pageNum # of #: totalPages #</div>*@
                                                    .Pdf(pdf => pdf
                                                    .FileName("Customer Orders Summary (Yearly).pdf")
                                                    .Margin("2cm", "1cm", "1cm", "1cm")
    function getDllValueForPrint() {
        var CustomerID = $("#CustomerID").data('kendoDropDownList');
        var selectedCustomerName = CustomerID.text();
        return selectedCustomerName;

1 Answer, 1 is accepted

Sort by
Ivan Danchev
Telerik team
answered on 11 May 2021, 05:55 AM

Hello Andrew,

The Template, the RepeatHeaders and the Scale options require PaperSize to be set. They don't work with the default value "auto" of PaperSize:

Ivan Danchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Asked by
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question