Page number issue with Table of content



  • I am using toc template when I use this code
    <!--
    TOC
    -----------
    we render TOC template twice
    the first in the main template - this is needed for inner pdf links
    the second time it is rendered as merge operation in pdf utils - this is needed to for gettign page numbers in TOC
    -->

    {#child ./toc @template.recipe=html}
    {{#level (getChapters)}}
    <div style='page-break-before: always;'></div>
    <h1 id="{{id}}">{{title}}</h1>
    <!-- pdf utils page item is used for getting page numbers in TOC template -->
    {{{pdfAddPageItem id=id}}}
    {{/level}}
    <!-- END TOC -->
    after some component rendering the page number will not show on the toc table it shows upward![alt text](0_1687440963722_upload-9e4bf5e4-c68a-4394-a8a0-e7fa90b95471 image url) here is the image


Log in to reply
 

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