Hi,
I read this
https://github.com/bpampuch/pdfmake#own-table-layouts
But I don't know how assign _exampleLayout_ to my table.
Like this maybe :
table: {
.....
},
layout: exampleLayout
or as a style:
style: 'exampleLayout',
table: {
.....
}
Thank's
There is an example here: http://pdfmake.org/playground.html click the Tables example
In the playground / tables , there are no examples regarding my request.
In fact there are only layouts specified within the content code.
In the page
the pdfMake.tableLayouts is wrote outside the content code.
So, how I can assign the custom Layout defined outside the content code to the tables inside the content code ?
Thank's
Normally in the _docDefinition_ you set the layout of the tables.
But I wish to define the layout of the tables in the object _pdfMake.tableLayouts_ outside of the _docDefinition_ object .
But I don't know how assign the layout to the tables.
I've try
table:{...},layout: name
where _name_ is the name set in the tableLayouts
but does not work
Please, can you tell me how I've to do ..
Thank's
I've done it !
So, first define _pdfMake.tableLayouts_ first of the _docDefinition_
Then in the _docDefinition_ assign the custom layout to a table like this :
table:{...},layout:pdfMake.tableLayouts.Mylayout
where _Mylayout_ is the name set in the tableLayouts
pdfMake.tableLayouts = {
Mylayout: {...}
};
var docDefinition = { ...
table:{...},layout:pdfMake.tableLayouts.Mylayout
...}
Most helpful comment
I've done it !
So, first define _pdfMake.tableLayouts_ first of the _docDefinition_
Then in the _docDefinition_ assign the custom layout to a table like this :
table:{...},layout:pdfMake.tableLayouts.Mylayoutwhere _Mylayout_ is the name set in the tableLayouts
pdfMake.tableLayouts = { Mylayout: {...} };var docDefinition = { ... table:{...},layout:pdfMake.tableLayouts.Mylayout ...}