XML technologies / XSL-FO / Reference / Attributes in XSL-FO / table-layout
(Excerpt from "XSL-FO ― Die Referenz" by Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)
Recommendation section: 7.28.16
Category: 7.28 Table Properties
Description
For a table (<fo:table>), this attribute enables or disables automatic column width adjustment. Automatic adjustment is enabled by default, so column widths are determined by their content. When it is disabled, column widths are made uniform and the table width is maximized. This function applies only to columns without a fixed width specified by column-width.
Values
auto | Column widths are determined by their content. |
fixed | Column widths are made uniform regardless of their content. |
Inherited: | yes |
Default value: auto
XSL-FO version: 1.0
Allowed in:
This element creates a table. |
Support:
Conformance level | Antenna House | FOP | RenderX XEP | Altsoft XML2PDF | Compart DocBridge |
Extended | Y | N | Y | Y | Y |
XSL-FO example:
<fo:root font-family="Arial" font-size="10pt" line-height="1.2em" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">
<fo:layout-master-set>
<fo:simple-page-master master-name="Inhalt-Seiten" margin="0mm 0mm 0mm 0mm" page-height="297mm" page-width="210mm">
<fo:region-body margin="5mm 5mm 5mm 5mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed">
<fo:table-header background-color="#4F491D">
<fo:table-row>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenkopf Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenkopf
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenkopf
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenkopf letzte Spalte
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-footer background-color="#4F491D">
<fo:table-row>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenfuß Spalte 1 Hallo Welt wie geht es dir?
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenfuß
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenfuß
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenfuß letzte Spalte
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body background-color="#F38222">
<fo:table-row>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 1 Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 1 letzte Spalte
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="center" starts-row="true" border="black solid 1pt">
<fo:block>
Zeile 2 Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 2
</fo:block>
</fo:table-cell>
<fo:table-cell ends-row="true" text-align="center" border="black solid 1pt">
<fo:block>
Zeile 2 letzte Spalte
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:table table-layout="auto">
<fo:table-header background-color="#4F491D">
<fo:table-row>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenkopf Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenkopf
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenkopf
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenkopf letzte Spalte
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-footer background-color="#4F491D">
<fo:table-row>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenfuß Spalte 1 Hallo Welt wie geht es dir
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenfuß
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenfuß
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Tabellenfuß letzte Spalte
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body background-color="#F38222">
<fo:table-row>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 1 Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 1 letzte Spalte
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="center" starts-row="true" border="black solid 1pt">
<fo:block>
Zeile 2 Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid 1pt">
<fo:block>
Zeile 2
</fo:block>
</fo:table-cell>
<fo:table-cell ends-row="true" text-align="center" border="black solid 1pt">
<fo:block>
Zeile 2 letzte Spalte
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>In the output:

Excerpt from the W3C Recommendation:
