This is how I call the render method in jsreport-core, the following config is the incoming template.
jsreport.render({ template: template, data: renderData })
{
"name": "name",
"shortid": "11111111111111",
"$entitySet": "templates",
"engine": "handlebars",
"recipe": "chrome-pdf",
"folder": {
"shortid": "Zw9h83c"
},
"phantom": {
"headerHeight": "120px",
"footerHeight": "155px",
"width": "1609",
"height": "1243",
"waitForJS": true,
"viewportSize": {
"width": "1510",
"height": "910"
},
"zoomFactor": "1.0"
},
"chrome": {
"width": "1609px",
"height": "1243px",
"marginTop": "150px",
"marginBottom": "189px",
"marginRight": "50px",
"marginLeft": "50px",
"waitForJS": true
},
"pdfOperations": [
{
"type": "prepend",
"templateShortid": "SpotTpCover"
},
{
"type": "merge",
"templateShortid": "SpotTpCover",
"renderForEveryPage": false,
"mergeWholeDocument": true,
"mergeToFront": true
},
{
"type": "merge",
"templateShortid": "header_footer",
"renderForEveryPage": false,
"mergeWholeDocument": true,
"mergeToFront": true
}
]
}