When i tried to display the footer with two contents(Confidential and Page Number) in a single row i will not able to achieve it.Any feature available in pdfmake to achieve it or is there any alternative solution.
Below is the snippet i tried in playground.
var dd = {
pageSize: 'LEGAL',
pageOrientation: 'landscape',
pageMargins: [40, 80, 40, 60],
footer: function (currentPage, pageCount) {
var columns = [ {
text: 'Confidential',
width: 'auto',
alignment: 'center',
},
{
text: 'Page ' + pageCount,
width: 'auto',
alignment: 'right',
}
]
return columns;
},
content: [
'Page Contents'
]
}
Am i a doing anything wrong?
Solution like this:
var dd = {
pageSize: 'LEGAL',
pageOrientation: 'landscape',
pageMargins: [40, 80, 40, 60],
footer: function (currentPage, pageCount) {
return {
table: {
widths: ['*', 100],
body: [
[
{text: 'Confidential', alignment: 'center'},
{text: 'Page ' + pageCount, alignment: 'right'}
]
]
},
layout: 'noBorders'
};
},
content: [
'Page Contents'
]
}
=
Solution like this:
var dd = { pageSize: 'LEGAL', pageOrientation: 'landscape', pageMargins: [40, 80, 40, 60], footer: function (currentPage, pageCount) { return { table: { widths: ['*', 100], body: [ [ {text: 'Confidential', alignment: 'center'}, {text: 'Page ' + pageCount, alignment: 'right'} ] ] }, layout: 'noBorders' }; }, content: [ 'Page Contents' ] }
Can I add dynamic content like this.customerName instead of Confidential in angular?
Most helpful comment
Solution like this: