When I try to put an json as content it does render as a whole string. So I see the json syntax in the pdf, instead of the formated. What did I miss?
var docDefinition = {
content: jsonObj,
styles: {
header: {
fontSize: 22,
bold: true
},
anotherStyle: {
italic: true,
alignment: 'right'
}
}
};
Ok. Turns out, that the array had pushed strings instead of objects. So code example is working.