Existing customer? Sign In
Below is the JSON used to create the dynamic table above. All of the attributes within the data parameter are non mandatory. Supply only what you want to populate on the document.
{
"template": "table1",
"font": "Roboto",
"data": {
"color": "#000000",
"logo": "https://docamatic.s3-eu-west-1.amazonaws.com/assets/360_logo.png",
"thead_dark": false,
"borderless": false,
"striped": true,
"compact": false,
"title": {
"value": "Dynamic Table",
"align": "left",
"size": 3
},
"info": {
"value": "This table was dynamically generated from JSON.\n\nEasily customize to your own look and feel.",
"align": "left",
"size": 0.8
},
"columns": [
{
"heading": "SKU"
},
{
"heading": "Description"
},
{
"heading": "Manufacturer"
},
{
"heading": "Unit Cost",
"align": "right"
},
{
"heading": "Quantity",
"align": "right"
}
],
"rows": [
[
{
"value": "PRS3f000011-AH"
},
{
"value": "Men's Pursuit Running Shoes - 10/M - BLACK"
},
{
"value": "Nike"
},
{
"value": "59.99",
"align": "right"
},
{
"value": "35",
"align": "right",
"bold": true
}
],
[
{
"value": "SBX44733742-BF"
},
{
"value": "Men's Shelby Leather Boots - 10/M"
},
{
"value": "Timberland"
},
{
"value": "79.99",
"align": "right"
},
{
"value": "20",
"align": "right",
"bold": true
}
],
[
{
"value": "KTR34534535-GT"
},
{
"value": "Gel Venture Trail Runners - 11/M - BLUE"
},
{
"value": "Asics"
},
{
"value": "54.99",
"align": "right"
},
{
"value": "12",
"align": "right",
"bold": true
}
]
]
}
}
It's easy to change the look and feel of the dynamic table. The template API allows you to easily insert your own logo and specify a custom font.
{
"template": "table1",
"font": "Open Sans",
"font_size": 0.9,
"font_color": "#32325d",
"data" : {...}
}
By default all templates are generated as a PDF document. If you would like to generate as a PNG image, supply the file_type parameter in your API request:
{
"template": "table1",
"file_type": "png",
"data" : {...}
}
If you prefer to build your own templates or require more flexibility, be sure to try our HTML to PDF API . We are using the same HTML to PDF API to generate the dynamic table above!
If you need a custom template please contact us to see if we can assist.
Back to templates