Issue with Header and footer in print format and pdf

I am new to erpnext and am trying to include letter head header into the PDF and Print format of purchase order but unable to do so. I am able to repeat footer, but not header.
I ll paste the screenshot as well for the reference.

I have also checked repeat header and footer in print setting.

Cannot replicate. Are you on the latest version?

My erpnext version is:

version = ‘7.1.0-beta’

My frappe version is:

version = ‘7.1.0-beta’

Any more information if you need please let me know.

Does the problem only occur in PDF’s ?

No, in both i.e. print format as well as when we click on pdf, i.e. pdf format.

@shradhdha03 how are you able to get the footer to show in pdf?

I cannot seem to get it to work


I got footer in pdf by adding following code in HTML:

<div id="footer-html" class="has-variables">
    {% if footer and not no_letterhead %}
    <div id="htmlfooter">
        {{ footer }}
    {% endif %}

and CSS:

@media screen {
        display: none;
@media print {

(I am using footer from letterhead)



But am terrible at programming, where exactly do I paste this? or how do I paste it??


Please check this…

Thanks, It worked!