Phantom-pdf - stick element at the bottom of the page ( !== footer)
Does anyone know how to stick element at the bottom of the last page (or any other than first)?
It's easy to achieve at the first page (position: absolute; bottom: 0) but when it comes to the next pages it doesn't want to stick at the bottom but right after last element which sometimes can end at the top otherwise at the half of the page.
I'm using phantomjs 2.1.1 version.
hi! why footer is not enough for your case? if for some reason the built-in footer is not enough for you, you can also emulate footer on your own, check this topic for some comments about it. it is not the greatest solution but it will let you position something on every page.
I've got many places in my PDF file where customer has to sign (sometimes it's page 2 and 5, another time 1 and 3 etc.) so I can't use built-in footer because I don't know which pages it will be.
How do I know what pageSize I've got? Does document.height include header and footer?
Thanks for your reply!
How do I know what pageSize I've got?
as the linked post in the topic says, it is a magic number, which means that you will need to try different values until some fits better. you can start with 1024 and increase or decrease the value depending on your machine.
Does document.height include header and footer?
no, standard header and footer are outside of the DOM so it won't be present in
document.height. so this assumes that you won't use standard header of footer at all, but instead position some elements to emulate the same functionality.