Displaying footer on everypage when generating PDF through HTML
Closed this issue · 1 comments
imad-haq commented
Hi,
I cannot display footer on everypage when generating PDF through HTML.
here is what I'm doing for displaying footer on every page:
#footer { position: running(footer); color: #003B5C; font-size: 10px; font-family: Mulish; } @media print { @page { size: A4; margin-top: 40px; margin-bottom: 40px; @bottom-left { content: element(footer); } } }
"
testing footer
"
Is it evern possible to display footer when generating PDF through HTML? If yes what is the solution?
Thanks
Aymkdn commented
Only a very limited number of CSS styles are supported. As explained in the documentation, the idea is to create a PDFMake object using HTML, because PDFMake object is difficult to manually create.
If you want to add footer, you have to do it when passing the result to PDFMake: https://pdfmake.github.io/docs/0.1/document-definition-object/headers-footers/