Export Grid to PDF with custom template

3 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
    2479 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!
Back to Top