I have a string which i want to set as the heading of the pdf. I tried it using the following code. But the background is not coming properly. I want to set the background color to the entire row, but it is coming just under text. Any help would be highly appreciated.
var dd = {
content: [
{
text: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
style: 'header'
},
],
styles: {
header: {
fontSize: 18,
bold: true,
margin: [0, 0, 0, 10],
background:'blue',
color: 'white',
alignment:'center'
}
},
defaultStyle: {
// alignment: 'justify'
}
}