I have found some fix for multipage header and footer, idk if there was any solution, I can hardly google the solution, my friend fix it up for me, so i am going to share it here.
I will use HEADER as an example, hope I can explain it clearly. Here we go:
First, go to your template file, we use quotation template as an example:
/application/views/quote_templates/pdf
and you may want to have your custom-pdf.css ready as well:
/assets/default/css
Now, go to the template file, you need to add <HTMLpageheader name='header_name'>
anywhere you might want to start defining your header. and close it with </HTMLpageheader>
at the end of your header. For example:
<body>
<HTMLpageheader name='header_name'>
<–Start with this
<header class="clearfix">
here is where your header content goes...
...
</header>
</HTMLpageheader>
<-- End with this
Save your file, now go to the /assets/default/css
custom-pdf.css
file, add:
@page {
header: header_name;
footer: footer_name;
}
anywhere, believe me, just add it and save. While "header_name"
and "footer_name"
can be whatever name you created. just make sure they are the same in both template and css file.
Save the file and then refresh your invoice~ DONE!!!
Same for footer.
And same for invoice tempalte. As the custom-pdf.css
is used by all of the template by default, you just need to do it once.
Hope I am making it clear enough. If someone already know and/or have better solution, please throw it out, I am spending quite a lot time searching for multipage solution.