django-easy-pdf icon indicating copy to clipboard operation
django-easy-pdf copied to clipboard

How to display page numbers in the footer

Open tinhnguyen-ea opened this issue 7 years ago • 0 comments

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?

tinhnguyen-ea avatar Nov 22 '17 06:11 tinhnguyen-ea