Pending Review
Last Updated: 27 Mar 2019 05:36 by ADMIN
Karl Mikesell
Created on: 18 Mar 2019 18:50
Category: Grid
Type: Feature Request
0
Additional PDF Template Variables

It would be nice if additional template variables where available, the only two: pageNum & totalPages are not enough.

Consider Time of Day & Filename at a minimum.

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

 

3 comments
ADMIN
Alex Hajigeorgieva
Posted on: 27 Mar 2019 05:36
Hi, Karl,

Do you think we should still keep this feature request or did you find it easy enough to use this approach?

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.
Karl Mikesell
Posted on: 26 Mar 2019 16:04

Yes, your example works.  I am able to get the filename in the header, and date in the footer.

Thanks.

ADMIN
Alex Hajigeorgieva
Posted on: 25 Mar 2019 14:00
Hi, Karl,

It is possible to add other variables to the template at present using the Kendo UI Templates' syntax, e.g:

<script>
    var fileName = "Test";
</script>

<script type="x/kendo-template" id="page-template">
    <div class="page-template">
      <div class="header">
      #:kendo.toString(new Date(), "d")# - File name #: fileName #
        <div style="float: right">Page #: pageNum # of #: totalPages #</div>
      </div>
      <div class="watermark">KENDO UI</div>
      <div class="footer">
        Page #: pageNum # of #: totalPages #
      </div>
      </div>
    </script>

With the right styling, the output is as expected:


Could you let us know if this approach works for you and if there is something else we need to consider?

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.