Forum How do I...?

footer or bottom

BadSanta
Hi, I generate pdf from html. It works perfect. On each page I have footer, where i generate some information. Now i want to show different footer for different pages. How can i configure prince to do that? For example, on page 1,3,5 one footer, and on 2,7,9 another, some pages must be without footers. How can I do that? please, help me ASAP...
mikeday
Here is some documentation for page headers and footers and for page selectors, which allow you to control headers/footers for left and right pages.
BadSanta
Hi. I used
@page:first {
but it works only for first page. I want something like
@page:second {} @page:third {
and so on, it will be perfect desicion for me... How can I do that?
:left and :right page selectors
aren't what i want...
I think I can use named pages but I don't understand how to use them... (I read documentation, but I am stupid person :lol: ) Please can you show me example how to use named pages selectors? thx.
BadSanta
Hey! I find solution! thank you! Your example on this page help me! yeah :) example help me to understand how does it work! sorry for duplicate topic. you can close and delete this topic.
BadSanta
Hello again :) I successfully configureв Prince and now I have different footer for different pages.

But I have another problem.
I have huge html-table. Under table I must have footer... but table can be different height. For example on the first page table didn't fit, and under rows that fit we must show footer, and on the next page, are rest 2-3 rows of the table, and I must show footer under this rows, not at the bottom of the page. How can I do that? If table is short, or piece of table on new page is short i must print footer exact under the table. Sizes of table can be different.

I attached screen what I want :)
  1. 1.jpg166.8 kB
BadSanta
Yeah! I solved problem :) I clear footer on page where table is situated, and add to table:
<tfoot> <tr> <td style='border: 0px;'>FOOTER that i need!! :) </td></tr></tfoot>

It works perfect!