This is a migrated thread and some comments may be shown as answers.
Kendo Grid PDFExport does not apply template with paperSize "auto"
1 Answer 5 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Taha asked on 22 Jan 2021, 05:27 PM

I am using Kendo grid jquery option pdf export and I am noticing that it does not apply template when the paperSize is set to "auto", however when I change it to "A4" it does apply.

Can anyone guide me what is the problem with "auto" ? I have a wide grid that cuts off when I set "A4" or "A3" with the landscape mode.

1 Answer, 1 is accepted

Sort by
Alex Hajigeorgieva
Telerik team
answered on 26 Jan 2021, 01:43 PM

Hello, Taha,

For the page template to work, it requires the use of either a pageSize or another page breaking mechanism such as the forcePageBreak:

Some things you can do to work around this specification:

  • Provide a non-existent selector in the forcePageBreak property.

Runnable example:

  • Set the paperSize option to a precalculated width and height

          Runnable example:

     var width = $("#my-element").width() + "pt";
    var height = $("#my-element").height() + "pt";
    kendo.drawing.drawDOM("#myelement", {
              paperSize:[width, height],
              template: $("#page-template").html()
              group.options.pdf.multiPage = false;
              kendo.drawing.pdf.saveAs(group, "filename.pdf");

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at

Asked by
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Share this question