title: How to Fix the table footer at bottom of the Page in XSL FO?
body: <p>I'm working with XSL-FO (processed using Apache FOP).</p>
  
  <p>My xsl code for tables looks like this:</p>
  
  <pre><code>&lt;!-- ... Some xsl fo code with data occupying 1/2 page ... --&gt;
  &lt;fo:table&gt;
     &lt;fo:table-header&gt;
        Item Name 
     &lt;/fo:table-header&gt;
     &lt;fo:table-footer&gt;
        Total: 
           &lt;xsl:value-of select="total" /&gt;
     &lt;/fo:table-footer&gt;
     &lt;fo:table-body&gt;
        &lt;fo:table-row&gt;
           &lt;xsl:value-of select="itemName" /&gt;
        &lt;/fo:table-row&gt; 
     &lt;/fo:table-body&gt;
  &lt;/fo:table&gt;
  </code></pre>
  
  <p>I want to have a table footer at the bottom of every page (I tried using <code>fo:table-footer</code>).</p>
  
  <p>I also want a footnote on the pages following the first one: if content requires more than a single page I need the footnote <code>"Continuation of previous page"</code> after the table footer.</p>
  
  <p>The table footer must show the total value only on the last page (I mean if I've 6 pages of table content <strong>every page except last</strong> must have footer with total value as blank and last page footer with value).</p>
  
  <p><strong>XML source:</strong></p>
  
  <pre><code>&lt;itemDetail&gt;
     &lt;itemName&gt;Car1&lt;/itemName&gt;
     &lt;itemName&gt;Car2&lt;/itemName&gt;
     &lt;itemName&gt;Car3&lt;/itemName&gt;
     &lt;itemName&gt;Car4&lt;/itemName&gt;
     &lt;itemName&gt;Car5&lt;/itemName&gt;
     &lt;itemName&gt;Car6&lt;/itemName&gt;
     &lt;itemName&gt;Car7&lt;/itemName&gt;
     &lt;itemName&gt;Car8&lt;/itemName&gt;
     &lt;itemName&gt;Car9&lt;/itemName&gt;
     &lt;itemName&gt;Car10&lt;/itemName&gt;
     &lt;itemName&gt;Car11&lt;/itemName&gt;
     &lt;itemName&gt;Car12&lt;/itemName&gt;
     &lt;itemName&gt;Car13&lt;/itemName&gt;
     &lt;itemName&gt;Car14&lt;/itemName&gt;
     &lt;itemName&gt;Car15&lt;/itemName&gt;
     &lt;itemName&gt;Car16&lt;/itemName&gt;
     &lt;itemName&gt;Car17&lt;/itemName&gt;
     &lt;itemName&gt;Car18&lt;/itemName&gt;
     &lt;itemName&gt;Car19&lt;/itemName&gt;
     &lt;itemName&gt;Car20&lt;/itemName&gt; 
  &lt;/itemDetail&gt;
  &lt;total&gt;20&lt;/total&gt;
  </code></pre>
  
  <p><strong>Required sample output of page 1:</strong>
  <img src="https://i.stack.imgur.com/G2SO7.png" alt="Required sample output of page 1"></p>
  
  <p><strong>Required sample output of Page 2:</strong>
  <img src="https://i.stack.imgur.com/KT6FL.png" alt="Required sample output of page 2"></p>