Thread Starter
silenx
(@silenx)
I found another post in the forum with the {{PAGE_NUM}} / {{PAGE_COUNT}} shortcode.
But seem that PAGE_NUM doesn’t work
Plugin Contributor
Ewout
(@pomegranate)
That’s strange… Is this on a custom template? If so, is it possible you remove the styles related to .pagenum?
/* page numbers */
.pagenum:before {
content: counter(page);
}
.pagenum,.pagecount {
font-family: sans-serif;
}
https://github.com/wpovernight/woocommerce-pdf-invoices-packing-slips/blob/v2.1.4/templates/Simple/style.css#L261-L267
Without the counter(page) bit this will not do anything.
Ewout
Thread Starter
silenx
(@silenx)
Yes, it’s a custom template, i will check for the css.
EDIT: no .pagenum in css
-
This reply was modified 8 years, 2 months ago by
silenx.
Thread Starter
silenx
(@silenx)
Thank you.
I added this to my css
/* page numbers */
.pagenum:before {
content: counter(page);
}
.pagenum,.pagecount {
font-family: sans-serif;
}
And now it work!
Only first page doesn’t show up page number.
Plugin Contributor
Ewout
(@pomegranate)
Where did you put the {{PAGE_NUM}} / {{PAGE_COUNT}} ?
Thread Starter
silenx
(@silenx)
i put into footer plugin options, not in the code ( admin.php?page=wpo_wcpdf_options_page&tab=general )
Plugin Contributor
Ewout
(@pomegranate)
In that case you will need repeating footers too:
Repeating headers & footers
I would recommend putting it in a separate div that you apply position:fixed to (as with the repeating footers), instead of putting it in the footer.
Ewout
Thread Starter
silenx
(@silenx)
Yes, i have repeating footer.
my css for footer is:
#footer {
position: fixed;
bottom: -1cm;
left: 0;
right: 0;
height: 1cm; /* if you change the footer height, don't forget to change the bottom (=negative height) and the @page margin-bottom as well! */
text-align: center;
border-top: 0.1mm solid gray;
margin-bottom: 0;
padding-top: 2mm;
}
Example:
with an invoice of 4 page i get: the first page without footer, the second with 2/4 , the third 3/4 and the last 4/4
With a single page invoice i have 1/1
Any idea?
Thread Starter
silenx
(@silenx)
Ok now work.
Thank you again 🙂
Now i have page number in every pdf page.
Plugin Contributor
Ewout
(@pomegranate)
sounds like you may not have had the footer at the top of your document? Or was it something else?