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