title: With Flying Saucer, how do I generate a pdf with a page number and page total on every page at the footer?
body: <p>It took me a little more research than I would have liked to figure this out on my own, so I'm going to post a comprehensive answer here.  It seems like the information to do this is spread across many different websites and I'd like to put it in one place.  <a href="https://stackoverflow.com/questions/8263416/generating-header-footer-with-flying-saucer-xhtmlrenderer-and-itext">This answer</a> <em>may</em> be the same thing, but my eyes glaze over because it's in a Java string and not in a html template.  Here's the question:</p>
  
  <p>I'm rendering a PDF and I want a footer at the bottom of the page that says, "Page n of m"  where "n" is the page number you're on and "m" is the total pages in the document.  How do I do that?</p>