You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Chuck Paussa <Ch...@systems.dhl.com> on 2002/06/12 17:33:54 UTC
Re: table-layout=fixed
Gabor,
Here's some sample code. Notice the use of proportional-column-width()
That allows you to do your percentage column widths.
proportional-column-width allows you to proportion the widths of those
columns not defined by a fixed width. You also need to designate the
width of the table in the table tag.
Chuck Paussa
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="first-page"
page-height="285mm" page-width="200mm" margin-top="5mm"
margin-bottom="5mm" margin-left="10mm" margin-right="10mm">
<fo:region-body margin-top="68mm" margin-bottom="20mm"/>
<fo:region-before extent="68mm" region-name="header-first"/>
<fo:region-after region-name="footer-first" extent="20mm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="rest-page" page-height="285mm"
page-width="200mm" margin-top="5mm" margin-bottom="5mm"
margin-left="10mm" margin-right="10mm">
<fo:region-body margin-top="68mm" margin-bottom="20mm"/>
<fo:region-before extent="68mm" region-name="header-first"/>
<fo:region-after region-name="footer-first" extent="20mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first-page">
<fo:static-content flow-name="header-first"
font-family="Helvetica" font-size="7pt" font-weight="normal">
<fo:block>
header
</fo:block>
</fo:static-content>
<fo:static-content flow-name="footer-first">
<fo:block>Footer</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="180mm" font-size="8pt">
<fo:table-column column-width="20mm"/>
<fo:table-column column-width="proportional-column-width(1)"/>
<fo:table-column column-width="proportional-column-width(2)"/>
<fo:table-header border="solid 1px black">
<fo:table-row display-align="after" color="black"
font-size="7pt" font-family="serif" font-style="normal"
font-weight="normal" height="4mm" background-color="transparent">
<fo:table-cell border="solid 1px silver">
<fo:block>DATE</fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px silver">
<fo:block>TIME</fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px silver">
<fo:block>Info</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="solid 1px silver">
<fo:block>04/18/2002</fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px silver">
<fo:block>2pm</fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px silver">
<fo:block>Ah isn't this a wonderful thing? Look
this column is twice as wide as that other one.</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
gabor wrote:
>hi,
>
>what should i do to get rid of that
>
>
>"[WARN]: table-layout=auto is not supported, using fixed!"
>
>message?
>
>i tried to put table-layout="fixed" into the <fo:table> tag, but it
>didn't help...
>
>and btw. what's the status of tables in fop?
>
>i understand i can't use fully dynamic tables, so i have to specify some
>width info... and can i specify % as column-width?
>
>thanks,
>gabor
>
>
>