Need for rendering same page 2



  • I have a need where i have to know the exact height of the document. I can only know this when the pages are rendered which is fine, but i also need to set the height of the whole document dynamically then in order for the content to stretch all available pages. Right now im using basically 2 same templates merging them but on the first one im setting visibility
    hidden, and on the second, setting body height to something like 100% * number of pages, since 100% references height of one page. Is there a more elegant way of doing this, instead of using 2 separate templates which are basically the same?



  • You can use jsreport script and afterRender hook to render the same template a second time just with different params
    https://jsreport.net/learn/scripts

    This can be seen for example on this example
    https://playground.jsreport.net/w/admin/tV6sVKbV


Log in to reply
 

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