i have an issue with the print formats.
I created a new one. Customizing it by using the grad’Ndrop editor.
= > fine so far. Normal Print work.
Now i try to send this invoice as email attachment (the default web functionality) select my custom format.
The arriving email contains the invoice as PDF.
But here is the point: In this PDF the invoice has no header or footer.
It shows just the middle part with the containing data.
(frappe/erpnext v13.8.x) updated today…
What I am missing here?..
Im doing it wrong?
How is it meant to be used?
Is there may an example to put a file based custom print format on an custom_app, so i can push it into a git repository?
Firstly you need to test if the invoice actually gets converted to pdf properly with header and footer. Dont go on what you see on print preview. Press the pdf button to convert it. Mostly probably it is same as the email attachment. Check your code for header and footer error.
You maybe printing directly using browser without converting to pdf. Which is why it looks fine.
This is correct.
The generated PDF (the PDF-Button on the invoice) also do not show the header.
Why this is different from the print view? This is confusing to me.
How i can make it happen to see the regular header/footer every site on the PDF?
What is the intended behavior?
Thank you for your effort.
The print format is made only by clicking in the frontend on my local dev-server.
So i don’t know how to share it.
Inserting this code into this HTML-Form was not repeating the header on every page of the pdf.
So i was trying to figure out to use your hint by creating this files:
custumization/print_format/my_format.json = > used
custumization/print_format/my_format.html
(used /erpnext/account/print_format/sales_auditing_voucher/* as an example)
after “bench migrate” i see my custom format in the list of print formats.
If im selecting the format in preview, i get
“No preview available.”
And when i try to see the PDF
{{ body }}
I was not able to find documentation about the format of the json or how i can exactly bring this custom print format to live.
How i convince the print-format to use my html file?
Where i can find documentation, that also explain things in the source code rather than only by using the frontend?
Maybe: witch project i can checkout for an example?
Wkhtmtopdf is a major pain, and because it needs to be installed at the system level there’s very little Frappe can do to control it. There are hundreds of threads, like you say, and the overwhelming majority of the time the issue is either binary versions or addressing/permissions.