Email PDF for Quotations/PO Requests (Maybe others?) are not including the letterhead or the other headers just below the letterhead

Email and PDF view displays with out the letter head, and with out the “Quotation/Estimate header”

I checked to make sure the host_name was set in the json file, did it via the bench command as well to double check. as suggested here Wkhtmltopdf layout error - #4 by lasalesi.

I ran the frappe.throw(html) and copied the html to run wkhtmltopdf on it from the server and there was no errors reported.

During this I did find something interesting, in the /tmp on the server there appear to be some left over html files from before they are sent to wkhtmltopdf, but when i run wkhtmltopdf on them manually it produces a pdf that has the missing headers but not the body!?!?

Going to keep looking into this tomorrow, hopefully if I can fix it i’ll post the solution. Any advice on where to look is welcome.

1 Like

result from a left over html in /tmp

Seems to be related to the Repeat header and footer option on the Print settings shown here, I unchecked this box and everything works now

Have you considered to use a “Custom Print Format”? It might seem more difficult at first, but leaves you full control on what you want to render and how…

Did somebody found a solution to this issue?
I’d love to work with ERPnext soon, but failing already at those simple things.

I run
ERPNext: v12.7.0 (version-12)
Frappe Framework: v12.5.0 (version-12)
on a Ubuntu 18.04 LTS installation and freshly installed wkhtmltopdf 0.12.4

I can confirm that the letterhead appears when I uncheck the repeat function. In both cases the footer does not appear.

Any suggestions?

Extacly same problem here than Josh_d for quotation, but fix after install wkhtmltopdf 0.12.6 from here on ubuntu 20.04
Work with Repeat header and footer option on adapted print format from Standard on Quotation