Try ERPNext Buy Support Partners Foundation

Issue with Header and footer in print format and pdf

Hello.
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?

Yes.
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

Regards

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 }}
    </div>
    {% endif %}
</div> 

and CSS:

@media screen {
    .has-variables{
        display: none;
    }
}
@media print {
    .has-variables{
        display:block;
    }
}

(I am using footer from letterhead)

1 Like

Thanks,

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

Regards

Please check this…
https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/print-format

Thanks, It worked!