Hello everyone,
Please, I would like you to help me.
I want to know what is the correct way to concatenate text with independent styles within a cell.
The code is the following:
{
table: {
widths: ['*','auto',150,'*'],
body: [
['Nro','Nombre','Apellidos','Dni'],
['001','Pepe','Suarez','7041654'],
['002','Miguel','Sanchez','8787997'],
['003','Juan', ['Suarez',{text:'Benites',bold:true}],'8787997']
],
headerRows: 1
}
}
And the current result is:

The result I need is:

I do not know why it makes a line break.
Thank you very much.
See https://github.com/bpampuch/pdfmake#styling, texts must be in one text element.
Example:
{
table: {
widths: ['*','auto',150,'*'],
body: [
['Nro','Nombre','Apellidos','Dni'],
['001','Pepe','Suarez','7041654'],
['002','Miguel','Sanchez','8787997'],
['003','Juan', [ {text: ['Suarez ', {text:'Benites',bold:true}]} ],'8787997']
],
headerRows: 1
}
}
Thank you very much. It works perfect
Most helpful comment
See https://github.com/bpampuch/pdfmake#styling, texts must be in one
textelement.Example: