django-easy-pdf
django-easy-pdf copied to clipboard
How to display page numbers in the footer
Anyone here can tell me how to add the page number to the footer? I searched around and followed this post but I didn't get it works.
In base template file I added this block:
<div id="footerContent">
{%block page_foot%}
<pdf:pagenumber />
{%endblock%}
</div>
And some styles:
@page {
size: {{ pagesize }};
margin: 1cm;
@frame footer {
-pdf-frame-content: footerContent;
bottom: 0cm;
margin-left: 18cm;
margin-right: 0cm;
height: 1cm;
}
}
Unfortunately, it doesn't work. So could yoy please tell me what I did wrongly or am I missing something?