I am making a sales invoice pdf using pdfmake. I want to put my company logo, and company details such as name, contact number, email, website etc in the header of the pdf document. I tried
header: "document header"
var docDefinition = {
header: 'simple text',
footer: {
columns: [
'Left part',
{ text: 'Right part', alignment: 'right' }
]
},
content: (...)
};
I can only add one pdfmake element. I want to add multiple-element in the header (and footer) of the document. Is it possible to add multiple-element? Is there any alternative way to achieve this?
[1] https://pdfmake.github.io/docs/document-definition-object/headers-footers/
I tried example from above url[1]. it doesn't mention multiple elements.
For adding multiple elements in header , you have to adjust page margin. It can be done as follow:
pageMargins: [ 40, 60, 40, 60 ],
You can change these values according to your requirements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With