1
votes

I have a problem with absolute positioning in XSL FO. When creating a document I have to add a table to the bottom of a page. The problem is that the height of the table is not known. The following example shows my effort, but still the table is aligned to the top of the page.

<fo:block-container 
    bottom="1cm" 
    left="0" 
    width="100%" 
    height="auto" 
    position="absolute">
 <fo:table 
    border="0.5pt solid black" 
    border-collapse="collapse" 
    text-align="left" 
    table-layout="fixed" 
    width="100%" 
    background-color="white" 
    font-size="7pt">
  <fo:table-column column-width="60%"/>
  <fo:table-column column-width="40%"/>
  <fo:table-body>
    <fo:table-row border="0.5pt solid black">
      <fo:table-cell 
          border="inherit"  
          display-align="center"  
          padding="1pt" 
          padding-left="2pt">
        <fo:block>abcde</fo:block>
      </fo:table-cell>
    </fo:table-row>
    <fo:table-row border="0.5pt solid black">
      <fo:table-cell 
          border="inherit"  
          display-align="center"  
          padding="1pt" 
          padding-left="2pt">
        <fo:block>abcde</fo:block>
      </fo:table-cell>
    </fo:table-row>
  </fo:table-body>
</fo:table>
</fo:block-container>

So the question is: Is there any solution how to align table to bottom of the page without knowing the height of the table?

I tried also to put the table in a footer, but if I don't know the hieght, I can't set the extent of the region-after.

Note: I have a block-container that has the same width and height as the page. The code above is in this container.

Note 2: I use fop 1.1

1

1 Answers

2
votes

Throw it into a footnote. That grows up from the bottom of the body region to an arbitrary height. I tell my students this technique is useful for things like disclaimers at the bottom of the last page of a legal document. No block containers are needed; no measurements needed.