Exporting multiple charts (and grids) to PDF

2 posts, 0 answers
  1. Richard
    Richard avatar
    8 posts
    Member since:
    Mar 2017

    Posted 04 Oct Link to this post

    Hello,

    I found this helpful example on exporting multiple charts to PDF:

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

     

    We have the need to put in a header and footer in our PDF. Is it possible to do that?

     

    Here is our code:

        $(document).on("click", "#btnPdf", function () {

            // Convert the DOM element to a drawing using kendo.drawing.drawDOM
            kendo.drawing.drawDOM(".my-results-page-container")
            .then(function (group) {
                // Render the result as a PDF file
                return kendo.drawing.exportPDF(group, {
                });
            })
            .done(function (data) {
                // Save the PDF file
                kendo.saveAs({
                    dataURI: data,
                    fileName: "My Test PDF.pdf"
                });
            });
        });

    We use the drawDOM function. Is it possible to use a pageTemplate? If so, I can't find any documentation on that subject...can someone help?

    Thank you!

  2. Stefan
    Admin
    Stefan avatar
    1127 posts

    Posted 06 Oct Link to this post

    Hello, Richard,

    Currently, these are the supported properties when exporting the page content with multiple elements:

    https://docs.telerik.com/kendo-ui/api/javascript/drawing/pdfoptions

    There is an option to set a template, but the templates only work if the paperSize is not auto, which is not always acceptable when exporting multiple elements:

    http://dojo.telerik.com/aBUpi/7

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