How to include image inside the header & footer template for a grid when exporting to PDF and Excel.

3 posts, 1 answers
  1. Yanesh
    Yanesh avatar
    15 posts
    Member since:
    Aug 2016

    Posted 15 Sep 2017 Link to this post

    How to include image inside header & footer template for a grid when exporting to PDF and Excel.

    The Image should only be displayed in the exported files and not in the webpage.
    How to implement this in both JavaScript and ASP MVC?

  2. Answer
    Stefan
    Admin
    Stefan avatar
    2835 posts

    Posted 19 Sep 2017 Link to this post

    Hello Yanesh,

    Regarding the requirements:

    1) An image can be added only to the exported PDF using the pdf.template option of the Kendo UI Grid PDF export:

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

    MVC demo with external template:

    http://demos.telerik.com/aspnet-mvc/grid/pdf-export

    Please have in mind that the PDF export module might not be able to export images hosted on a different domain. See Known Limitations:

    http://docs.telerik.com/kendo-ui/framework/drawing/drawing-dom#known-limitations

    Setting up permissive Cross-Origin HTTP headers should help in this case:

    https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image

    2) Currently, the Excel export will be based only on the data in the Grid dataSource.  I can suggest voting for a similar feature in our feedback portal as this will increase its changes to be implemented sooner:

    http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/suggestions/11603982-excel-export-with-image-for-grid

    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.
  3. Yanesh
    Yanesh avatar
    15 posts
    Member since:
    Aug 2016

    Posted 26 Sep 2017 in reply to Stefan Link to this post

    Thanks Stefan. This was  helpful.
Back to Top