You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jason Stell <Ja...@globalone.net> on 2000/04/18 17:30:01 UTC
HELP! : Fixed Table Cell Size
I'm trying to create a table with cells of fixed dimension.
Unfortunately, the cell/row height in the fop-generated PDF file always
varies with the cell content, even though I set the row-height property,
the cell-height property, etc. Am I missing something?
TIA!
Jason Stell
==========================================================================
<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- defines the layout master -->
<fo:layout-master-set>
<fo:simple-page-master page-master-name="first"
height="11in" width="8.5in"
margin-top="0.5in"
margin-bottom="0.5in"
margin-left="0.5in"
margin-right="0.5in">
<fo:region-before extent="3cm"/>
<fo:region-body margin-top="3cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<!-- starts actual layout -->
<fo:page-sequence>
<!-- applies layout master -->
<fo:sequence-specification>
<fo:sequence-specifier-single page-master-name="first"/>
</fo:sequence-specification>
<!-- Inserts a header with the page number -->
<fo:static-content flow-name="xsl-before">
<fo:block text-align="end" font-size="10pt" font-family="serif"
line-height="14pt">
FOP - p. <fo:page-number/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-body">
<!-- Here starts the table -->
<fo:table table-layout="fixed" table-height="8in">
<fo:table-column column-width="4in"/>
<fo:table-body font-size="10pt" font-family="sans-serif">
<fo:table-row row-height="2in">
<fo:table-cell cell-height="2in" vertical-align="top"
padding="1">
<fo:block text-align="start">CELL 1</fo:block>
<fo:block text-align="start">Another Line</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row row-height="2in">
<fo:table-cell cell-height="2in" vertical-align="top"
padding="1">
<fo:block text-align="start">CELL 2</fo:block>
<fo:block text-align="start">Another Line</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row row-height="2in">
<fo:table-cell cell-height="2in" vertical-align="top"
padding="1">
<fo:block text-align="start">CELL 3</fo:block>
<fo:block text-align="start">Another Line</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row row-height="2in">
<fo:table-cell cell-height="2in" vertical-align="top"
padding="1">
<fo:block text-align="start">CELL 4</fo:block>
<fo:block text-align="start">Another Line</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row row-height="2in">
<fo:table-cell cell-height="2in" vertical-align="top"
padding="1">
<fo:block text-align="start">CELL 5</fo:block>
<fo:block text-align="start">Another Line</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>