rendercarbonetemplate - Render Carbone Template
Fills the provided carbone template with data. This function uses the Carbone JS Community Edition on 1001fx servers.
filebinary
Template file to be processed.
dataobject
Data to fill your template with. Either data or stringified data needs to be provided.
Example:
{
"companyName": "JohnInsurance & Co",
"period": 2,
"sD": 1659041229,
"id": 2891,
"insured": {
"name": "Jean Michel",
"street": "23, Sycamore Street",
"city": "New York",
"phone": "+33 2 38 99 18 23"
},
"showPropertyDamage": false,
"propertyDamage": [
{
"type": "Fire"
},
{
"type": "Wind"
},
{
"type": "Hail"
},
{
"type": "Water"
}
],
"options": [
{
"type": "Furniture",
"note": "/",
"cost": 1200
},
{
"type": "Appliances",
"note": "/",
"cost": 400
},
{
"type": "Clothing",
"note": "/",
"cost": 300
},
{
"type": "Dishes",
"note": "in some cases",
"cost": 300
}
],
"optionsTotalHT": 2200,
"optionsTaxes": 10,
"optionsTotal": 2420
}stringifiedDatastring
Stringified data to fill your template with.
Example:
{"companyName":"JohnInsurance & Co","period":2,"sD":1659041229,"id":2891,"insured":{"name":"Jean Michel","street":"23, Sycamore Street","city":"New York","phone":"+33 2 38 99 18 23"},"showPropertyDamage":false,"propertyDamage":[{"type":"Fire"},{"type":"Wind"},{"type":"Hail"},{"type":"Water"}],"options":[{"type":"Furniture","note":"/","cost":1200},{"type":"Appliances","note":"/","cost":400},{"type":"Clothing","note":"/","cost":300},{"type":"Dishes","note":"in some cases","cost":300}],"optionsTotalHT":2200,"optionsTaxes":10,"optionsTotal":2420}outputFormatstring
Output format for your rendered template. Defaults to the format of the provided template.
Possible values are: pdf, xslx, docx, ods, csv, txt, odt
Example:
pdf