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.
    0_1533301929562_upload-e3ecbc34-d43c-4312-9786-374ebf047c97
    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.
    Thanks


  • administrators

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

    <!--footer template content-->
    <html>
      <head>
        <style>
          /* defining explicit font-size solves the scaling issue */
          html, body {
            font-size: 12px;
          }
        </style>
      </head>
      <body>
        <!--
          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>
      </body>
    </html>
    

    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.

    Thanks,
    Rashmi


  • 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.