xsl-list
[Top] [All Lists]

Re: [xsl] [XSL-FO] How to adjust the height of a cell to fit in the available space?

2006-12-05 15:38:46
Florent Georges wrote:
  I have an XSL-FO document that is a fixed table.  Nothing
complex.  But the layout is not really fixed.  Let say the
page looks like the following table:

    +-----------+--------------------------+
    | Some list | An item                  |
    |           | Another                  |
    |           | Other one                |
    +-----------+--------------------------+
    |                                      |
    |                (1)                   |
    |                                      |
    +-----------------+--------------------+
    | Fixed text      |           Here too |
    +-----------------+--------------------+

  The bottom is fixed text.  The first line ("Some list") is
a list of items from 1 to N.  And (1) is a blank area used
to fill information by hand on the printed document.

  What I'd like is that the bottom of the table will be
always at the same place in the page (the table will always
have the same total heigth).  Because the height of "Some
list" is not fixed, I'd like the (1) cell grows or reduces
to fit exactly in the available space.

I'd try nested tables or a fixed height block followed by a table.
For example:
  <fo:table heigth="{$the-darned-table-height}" ...>
    ...column decls...
    <fo:table-body>
      <fo:table-row height="{$the-darned-table-height -
            $fixed-text-height}" ...>
       <fo:table-cell number-columns-spanned="2" ...>
          <fo:table ...>
              ... "some list" stuff ...
          </fo:table>
       </fo:table-cell>
      </fo:table-row>
      <fo:table-row>
        <fo:table-cell> ... Fixed text ... </fo:table-cell>
        <fo:table-cell> ... Here too ... </fo:table-cell>
      </fo:table-row>
    </fo:table-body>
  </fo:table>

HTH

J.Pietschmann

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>