I’m try header-html,footer-html
but not working in print format
how to set header and footer for all pages in print format
use below code
for header
<p style="margin-top: 0; margin-bottom: 0"><font face="Calibri" style="font-size: 9pt">{%- macro add_header(page_num, max_pages, doc, letter_head, no_letterhead) -%} {% if letter_head and not no_letterhead %}</font></p>
<div style="height: -25mm" class="letter-head">
<p style="margin-top: 0; margin-bottom: 0"><font face="Calibri" style="font-size: 9pt">{{ letter_head }}</font></p>
</div>
<p style="margin-top: 0; margin-bottom: 0"><font face="Calibri" style="font-size: 9pt">{% endif %} {% if max_pages > 1 %}</font></p>
<p class="text-right" style="margin-top: 0; margin-bottom: 0"><font face="Calibri" style="font-size: 9pt">{{ _("Page #{0} of {1}").format(page_num, max_pages) }}</font></p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Calibri" style="font-size: 9pt">{% endif %} {%- endmacro -%}</font></p>
<div id="header-html" class="hidden-pdf">
<p style="margin-top: 0; margin-bottom: 0"><small><big><font face="Calibri" style="font-size: 9pt">{{ add_header(0,1,doc,letter_head, no_letterhead) }}</font></big></small></p>
<p style="margin-top: 0; margin-bottom: 0">
</p>
</div>
for footer
<div>
<div id="footer-html" class="visible-pdf">
<p style="margin-top: 0; margin-bottom: 0">
<font face="Calibri" style="font-size: 8pt">{% if not no_letterhead and footer %}
</font>
</p>
<div style="height: -15mm" class="letter-head-footer">
<p style="margin-top: 0; margin-bottom: 0">
<font face="Calibri" style="font-size: 8pt">{{ footer }}
</font>
</div>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Calibri" style="font-size: 8pt">{% endif %}
</font>
</p>
<p class="text-center small page-number visible-pdf" style="margin-top: 0; margin-bottom: 0" align="right">
<font face="Calibri" style="font-size: 8pt">Reservation Form</font></p>
<p class="text-center small page-number visible-pdf" style="margin-top: 0; margin-bottom: 0" align="center">
<font face="Calibri" style="font-size: 8pt">{{ _("Page {0} of {1}").format('</font><span class="page"></span><font face="Calibri" style="font-size: 8pt">', '</font><span class="topage"></span><font face="Calibri" style="font-size: 8pt">') }}</font></p>
</div>
</div>
7 Likes
ok i will try
In Pdf format not showing but in full page view it is preesent