Header Footer not repeating for PDF or print v14


I am on the latest version v14 of ERPNext and building a custom print format for appointment letters. But when I print or convert the document to PDF header only shows on 1st page and the footer on last page. I tried various suggestions in this forum, but unable to find a solution. Is this broken or I am missing something? Thanks for your help.

wkhtmltopdf has been updated to the latest 0.12.6-2 version.

in print setting I have enabled print header and footer setting.

{% if letter_head and not no_letterhead -%}

  <div class="letter-head">{{ letter_head }}</div>
{%- endif %}

{{ content }}

<div id="footer-html" class="visible-pdf">
    {% if footer and not no_letterhead %}
    <div id="letter-head-footer">
        {{ footer }}
    {% endif %}

Hi @saurabhn,

Please check it.

Thank You!

1 Like

Thanks for the reply, I tried the solution but it does not work. Header is printed only on the 1st page and footer on the last. It does not repeat the header footer on all pages.

Hi Saruabhn,
Did you find any Solution ?

Sorry for the late reply. What I figured out is that it works if you view the doc as PDF. But if you directly Print the doc then the header and footers dont get repeated.


That’s very bad, as I have made all of prints (20) in Directly Print Format.