Export Grid to PDF with custom template

5 posts, 1 answers
  1. Yan
    Yan avatar
    2 posts
    Member since:
    Dec 2017

    Posted 04 Dec 2017 Link to this post

    Hello guys.

    Basically I'm trying to export my grid to PDF and this works just fine simply reading kendo documentation. But when I open this generated PDF, it looks just like a printscreen to me. What I wanna do is change it, use some kind of custom template (e.g html) or something and beautify this.

    I'm only using this lines of code for properly working:

    var grid = $("#grid").data("kendoGrid");

    kendo.drawing.drawDOM($("#grid")).then(function (group) {
        kendo.drawing.pdf.saveAs(group, "test.pdf");
    });

     

    Is there some way of doing this? (Changing this generated PDF layout)

  2. Answer
    Stefan
    Admin
    Stefan avatar
    2752 posts

    Posted 06 Dec 2017 Link to this post

    Hello, Yan,

    The Grid offers a built-in PDF export which allows certain modifications to be made to the exported document, like a template, a watermark etc:

    http://demos.telerik.com/kendo-ui/grid/pdf-export

    https://docs.telerik.com/kendo-ui/controls/data-management/grid/pdf-export

    Please check all of the built-in options:

    https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-pdf

    Let me know if additional assistance is needed on this matter.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Yan
    Yan avatar
    2 posts
    Member since:
    Dec 2017

    Posted 06 Dec 2017 in reply to Stefan Link to this post

    Thank you so much!
  4. Lee
    Lee avatar
    70 posts
    Member since:
    May 2019

    Posted 03 Dec 2019 in reply to Stefan Link to this post

    Stefan said:Hello, Yan,

    The Grid offers a built-in PDF export which allows certain modifications to be made to the exported document, like a template, a watermark etc:

    http://demos.telerik.com/kendo-ui/grid/pdf-export

    https://docs.telerik.com/kendo-ui/controls/data-management/grid/pdf-export

    Please check all of the built-in options:

    https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-pdf

    Let me know if additional assistance is needed on this matter.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.

     

    These links all go to 404 pages.

  5. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    956 posts

    Posted 05 Dec 2019 Link to this post

    Hello, Lee,

    When I tested the links, the first one redirected me to the demo with HTTPS:

    https://demos.telerik.com/kendo-ui/grid/pdf-export

    The last one, redirected me to the pdf configuration that is currently at this address:

    https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/pdf

    However, the second one indeed resulted in a 404. Thank you for reporting it. I have updated your Telerik points accordingly and fixed the previous URL.

    Kind Regards,
    Alex Hajigeorgieva
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top