JS Report customized footer

  • Hi,
    I am using JS Report v2 and chrome-pdf for getting reports. I want to use a footer which can show the current date time and the page number instead of the following which shows the random path and page number.
    I used display header/footer in template properties and then chrome pdf tab.It will be great if you can assist me in getting rid of the path in footer with customized tag.

  • administrators

    i use the following content in my footer and i don't get the path printed:

    <!--footer template content-->
          /* defining explicit font-size solves the scaling issue */
          html, body {
            font-size: 12px;
          defining some elements with the special css classes makes chrome
          inject content in runtime
        <span class="pageNumber"></span>&nbsp;of&nbsp;<span class="totalPages"></span>

    0_1533307173985_Captura de pantalla 2018-08-03 a las 9.39.16 a.m..png

    however if you still get this for some different html that you have, you can try to add this

    <span class="url" style="display: none;"></span>

    it will add the file path in that tag but it will make it invisible.

  • And in headers, It shows the date. How to remove that.


  • administrators

    the same logic as previous comment, just that the class name is different:

    <span class="date" style="display: none;"></span>

    the whole list of all special chrome class names are in the docs

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.