Text and Tables

Text

It's very easy to create dynamic text fields in EDocGen. Open the Word/PDF template and add { } around the dynamic field.

Ex: {field1}

      {Field_1}

  Make sure there are no spaces between words. Also, remove any space between braces and field name.


Table


The Table is nothing but a loop with dynamic fields.  EDocGen loops the data file to populate table rows.

Role

Company

Address

{#Job} {Role}

{Company}

{Address} {/Job}


{#tagName}{/tagName} is the syntax for loops. Notice {#Job} {/Job} tags. With following JSON,  EDocGen loop over array to populate two rows into the Job table.

[ {

        "Enter_Name": "Steve",

          "Enter_Email": "Steve@mail.com",

       "Job": {

            "Role": "Engineer",

            "Company": "Cisco",

            "Address": "SanJose"

        },      

       "Job": {

            "Role": "Engineer",

            "Company": "Oracle",

            "Address": "SanJose"

        }

  }

]


EDocGen also supports nested tables - table inside a table.


H1

H2

H3

H4

{#table1}{#table2}{#table3}{#table4}{t41}

{t42}

{t43}

{t44}{/}{/}{/}{/}


The corresponding JSON for this table population is

                  [{
                    "table1": [{
                            "table2": [{
                                "table3": [{
                                     "table4": [{
                                         "t41": "t41data",
                                        "t42": "t42data",
                                    "t43": "t43data",
                                    "t44": "t44data"
                                }]
                            }]
                        }]
                    }]
                }]