title: Wicked pdf footer at the bottom of the last page
body: <p>I render a pdf that doesn't have a fixed height.
  I would like to append a footer at the bottom of the last page only, I have tried to play with css but it's still showing on the footer of the first page.</p>
  
  <p>Any ideas?</p>
  
  <p>At this moment I have a css like this</p>
  
  <pre><code>body {
    # tried with height: 100% too
    height: 269mm; # a standard A4 height
  }
  
  div.footer {
    position: absolute; # tried with fixed too
    bottom: 0px;
    height: 200px;
  }
  </code></pre>
  
  <p>I think that the best solution is working with javascript and checking when the last page is coming, but how can I do?</p>
  
  <p>Another note, seems that having:</p>
  
  <pre><code>body { height: (nr_pages * 269)mm }
  </code></pre>
  
  <p>is a working solution (maybe not so nice). How can I retrieve the total number of the pages (inside the view)?</p>