Components/childTemplate content Using API

  • I want to create document structure that will include:

    1. Cover Page
    2. TOC
    3. Page numbers

    the actual content of the document is a dynamic Template so using Components/childTemplate looks like the best option.

    Another requirement is that the Component/childTemplate body will be provided from a API call .
    Using the playground example for Components/childTemplate looks like the actual content is store in the DB.
    Here are my questions ?

    1. Use Components OR childTemplate ? what will be the best option
    2. Use beforeRender script to update the Component/childTemplate ? for the budy
    3. How to create the Page numbers
    4. How to create the TOC

    Thank you for the help

  • Another wild option is using Docx as the base template, so Page number + TOC will be cover ,
    The content will be html that will be create in a beforeRender script ..

  • The documentation mentiones two approaches on how to render ToC with page numbers. Both approaches have linked playground demo

    You can also look at the stock showcase demo. That has the same requirements like you.

    If you get to a specific problem, don't hesitate to ask for help.

Log in to reply

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