After creating a letterhead with header and footer, normal preview shows the footer right after invoice content instead of the bottom. Now PDF helps us to have the footer in the bottom as well as in every page.
Issue is, if an invoice has more items which exapands to multiple pages , the last item gets cropped by the footer. The easiest solution is to have the footer only in the last page instead of every pages or the normal preview and print showing the footer in the bottom. I also found that when I print the invoice directly without generating PDF, only the first gets printed.
I would really love have the solution. Is there any coding can I use for the print format or for wkhtmltopdf?
We do have same issue but these are the limitation of html and wkhtml2pdf. I hope someone can look into it and advice how we can achieve dynamic ways of print formats with respect to the footer.
This setting is now available from v14 I think, I’m not sure about v13. If you uncheck the “Repeat Header and Footer in PDF”, Header will be on the first page, and footer will be only on the last page.
Thank you for your answer @fnrfarid
I tried it, but the problem now is that the footer is not fixed to the bottom of the page… it’s appearing after the last content of the PDF( if the pdf contains juste some lines, the footer appears in the middle of the page) any solution for this please ?
<div class="header"> <!-- HEADER -->
<div style="text-align: center;">
<img alt="Al Yusr Letter Head" height="80px" src="" width="100px">
</div>
<p><b>VATIN #:</b>OM11######</p>
<hr>
</div>
<div class="footer">
<p class="text-center small page-number hidden-pdf">
{{ _("Page {0} of {1}").format('<span class="page"></span>', '<span class="topage"></span>') }}
</p>
<p style="text-align: justify"> <!-- FOOTER -->
*** Any Discrepancy of consignments delivered at your site/store should be brought to our notice within <b>24 Hours</b> from the time of receipt *** <br />
</p>
<hr>
<div style="text-align: center;">
<img alt="Al Yusr Letter Head" height="120px" src="" width="900px">
</div>
</div>
The below code is That I am using for custom print formats, but when I print, the page content overlaps the header and the footer. secondly I also cannot get the Pagination. Please Look in this Issue, I have been stuck for 3 weeks now.
This is a sample Delivery Note Jinja Print Format. Between the header and footer, you need to provide the content you want to print. You can take some idea from this and implement your own
I am using this as custom print format in print formats doctype, the letter head is already created, I tried to put the link here in the code as well, but This does not work.