Custom Print format doesn’t Repeat letterhead and footer in PDF

In the custom print format, the footer and letterhead are not repeated on every page of the pdf. How to add both on each and every page of the pdf.

Thanks in advance.

Use below in 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>

and use below in 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>
1 Like

It’s not working!