title: How to align figure/table to the top or bottom of the page in XSL-FO (FOP 2.1)
body: <p>In the case figure or table is a bit larger it would be really suitable to move them to the top or the bottom of the page. The ability to reflow table to the next page with repeating its headers is great but not always what I want. In the case table or figure fits well in the page and it is not necessarily anchored to a paragraph, there is no reason to reflow it. It would be better to make it “floating” outside the body of the page.</p>
  
  <p><a href="https://stackoverflow.com/a/6842089/4120271">This answer</a> is really inspiring but I am not sure how to apply it to my case. I would be happy if I could do it according to a <code>@rendition</code> attribute of the table.</p>
  
  <pre><code>&lt;fo:layout-master-set&gt;
      &lt;fo:simple-page-master master-name="PageMaster.Title-Page" page-height="{$paper-height}" page-width="{$paper-width}" margin-left="{$margin-left}" margin-right="{$margin-right}" margin-top="{$margin-top}" margin-bottom="{$margin-bottom}"&gt;
          &lt;fo:region-body/&gt;
      &lt;/fo:simple-page-master&gt;
      &lt;fo:simple-page-master master-name="PageMaster.CopyRight-Page" page-height="{$paper-height}" page-width="{$paper-width}" margin-left="{$margin-left}" margin-right="{$margin-right}" margin-top="{$margin-top}" margin-bottom="{$margin-bottom}"&gt;
          &lt;fo:region-body display-align="after"/&gt;
      &lt;/fo:simple-page-master&gt;
      &lt;fo:simple-page-master master-name="PageMaster.TOC" page-height="{$paper-height}" page-width="{$paper-width}" margin-left="{$margin-left}" margin-right="{$margin-right}" margin-top="18mm" margin-bottom="{$margin-bottom}"&gt;
          &lt;fo:region-body margin="0mm 0mm 0mm 60mm"/&gt;
      &lt;/fo:simple-page-master&gt;&lt;!-- Whole page left and right masters --&gt;
      &lt;fo:simple-page-master master-name="PageMaster.Page-Right.First" page-height="{$paper-height}" page-width="{$paper-width}" margin-left="{$margin-left}" margin-right="{$margin-right}" margin-top="{$margin-top}" margin-bottom="{$margin-bottom}"&gt;
          &lt;fo:region-body margin="8mm 0mm 20mm 0mm" column-count="2" column-gap="5mm"/&gt;
          &lt;fo:region-before region-name="Region-Before-Right" extent="10mm" display-align="after"/&gt;
          &lt;fo:region-after region-name="Region-After-First" extent="20mm" display-align="before"/&gt;
      &lt;/fo:simple-page-master&gt;
      &lt;fo:simple-page-master master-name="PageMaster.Page-Left" page-height="{$paper-height}" page-width="{$paper-width}" margin-left="{$margin-left}" margin-right="{$margin-right}" margin-top="{$margin-top}" margin-bottom="{$margin-bottom}"&gt;
          &lt;fo:region-body margin="8mm 0mm 20mm 0mm" column-count="2" column-gap="5mm"/&gt;
          &lt;fo:region-before region-name="Region-Before-Left" extent="10mm" display-align="after"/&gt;
      &lt;/fo:simple-page-master&gt;
      &lt;fo:simple-page-master master-name="PageMaster.Page-Right" page-height="{$paper-height}" page-width="{$paper-width}" margin-left="{$margin-left}" margin-right="{$margin-right}" margin-top="{$margin-top}" margin-bottom="{$margin-bottom}"&gt;
          &lt;fo:region-body margin="8mm 0mm 20mm 0mm" column-count="2" column-gap="5mm"/&gt;
          &lt;fo:region-before region-name="Region-Before-Right" extent="10mm" display-align="after"/&gt;
      &lt;/fo:simple-page-master&gt;
      &lt;fo:simple-page-master master-name="PageMaster.Blank" page-height="{$paper-height}" page-width="{$paper-width}" margin-left="{$margin-left}" margin-right="{$margin-right}" margin-top="{$margin-top}" margin-bottom="{$margin-bottom}"&gt;
          &lt;fo:region-body margin="8mm 0mm 20mm 0mm" column-count="2" column-gap="5mm"/&gt;
      &lt;/fo:simple-page-master&gt;&lt;!-- Sequence of even / odd pages --&gt;
      &lt;fo:page-sequence-master master-name="Content-Pages"&gt;
          &lt;fo:repeatable-page-master-alternatives&gt;
              &lt;fo:conditional-page-master-reference master-reference="PageMaster.Blank" blank-or-not-blank="blank"/&gt;
              &lt;fo:conditional-page-master-reference master-reference="PageMaster.Page-Right.First" odd-or-even="odd" page-position="first"/&gt;
              &lt;fo:conditional-page-master-reference master-reference="PageMaster.Page-Left" odd-or-even="even"/&gt;
              &lt;fo:conditional-page-master-reference master-reference="PageMaster.Page-Right" odd-or-even="odd"/&gt;
          &lt;/fo:repeatable-page-master-alternatives&gt;
      &lt;/fo:page-sequence-master&gt;
  &lt;/fo:layout-master-set&gt;
  </code></pre>