Tests with FOP 0.20.1 and PDF output:

o Cells
        - Define a rectangle with geometric lines as sides: width = 0.
        - Padding on the cell element offsets text within the cell rectangle.
        - Border rectangles are centered over the sides of the cell rectangle.
Adjacent cells put both centered border rectangles on common side lines.

o Tables
        - Borders are built around the cells, when cells are already formatted and
fixed to a page position.
        - Padding on the table element shifts the table border (not the table
itself relative to the parent) - e.g. out into the left margin.
        - Table borders are aligned outwards from the sides of the cell rectangles.
This produces an overlap with cell borders centered on cell rectangle sides.

This may sound very complicated. See my attached test data and the results,
zoom the test document as much as possible: if this is still an issue!


Hansuli Anderegg

Attachment: tables.pdf
Description: Adobe PDF document

<?xml version="1.0" encoding="ISO-8859-1"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; xmlns:src="UBSXMLSrc">
<fo:layout-master-set>
<fo:simple-page-master master-name="seiten" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="1.8cm" margin-right="2.0cm">
<fo:region-before region-name="s2ff-before" extent="2.0cm" />
<fo:region-body margin-top="1.0cm" margin-bottom="2.0cm" />
<fo:region-after region-name="s2ff-after" extent="2.0cm" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-name="seiten" initial-page-number="1">
<fo:static-content flow-name="s2ff-after">
<fo:block font-size="11pt" font-family="sans-serif" line-height="13pt" text-align="center" padding-top="12mm">
<fo:page-number />/<fo:page-number-citation ref-id="IDAWEF4" />
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">

<fo:block font-size="11pt" font-family="sans-serif" line-height="13pt" text-align="start">table border - cell padding, border</fo:block>
<fo:block>
<fo:table space-after.optimum="13pt" space-before.optimum="3pt" border-color="red" border-width="1.0mm" border-style="solid" font-size="10pt" font-family="sans-serif" text-align="start">
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-body>
<fo:table-row keep-with-next="always">
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="solid"   border-color="yellow">
<fo:block>cell 1.1</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="dashed"  border-color="green">
<fo:block>cell 1.2</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="dotted"  border-color="yellow">
<fo:block>cell 1.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="dashed"  border-color="green">
<fo:block>cell 2.1</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.2mm" border-style="dotted"  border-color="blue">
<fo:block>cell 2.2</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="solid"   border-color="green">
<fo:block>cell 2.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="dotted"  border-color="yellow">
<fo:block>cell 3.1</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="solid"   border-color="green">
<fo:block>cell 3.2</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="dashed"  border-color="yellow">
<fo:block>cell 3.3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>

<fo:block font-size="11pt" font-family="sans-serif" line-height="13pt" text-align="start">table border, padding top/bottom - cell padding, border</fo:block>
<fo:block>
<fo:table space-after.optimum="13pt" space-before.optimum="3pt" border-color="red" border-width="1.0mm" border-style="solid" padding-top="6pt" padding-bottom="6pt" font-size="10pt" font-family="sans-serif" text-align="start">
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-body>
<fo:table-row keep-with-next="always">
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="solid"   border-color="yellow">
<fo:block>cell 1.1</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="dashed"  border-color="green">
<fo:block>cell 1.2</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="dotted"  border-color="yellow">
<fo:block>cell 1.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="dashed"  border-color="green">
<fo:block>cell 2.1</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.2mm" border-style="dotted"  border-color="blue">
<fo:block>cell 2.2</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="solid"   border-color="green">
<fo:block>cell 2.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="dotted"  border-color="yellow">
<fo:block>cell 3.1</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="solid"   border-color="green">
<fo:block>cell 3.2</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="6pt" border-width="0.5mm" border-style="dashed"  border-color="yellow">
<fo:block>cell 3.3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>

<fo:block font-size="11pt" font-family="sans-serif" line-height="13pt" text-align="start">table border, padding left/right - cell border</fo:block>
<fo:block>
<fo:table space-after.optimum="13pt" space-before.optimum="3pt" border-color="red" border-width="1.0mm" border-style="solid" padding-left="6pt" padding-right="6pt" font-size="10pt" font-family="sans-serif" text-align="start">
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-body>
<fo:table-row keep-with-next="always">
<fo:table-cell border-width="0.5mm"         border-style="solid"   border-color="yellow">
<fo:block>cell 1.1</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.5mm"         border-style="dashed"  border-color="green">
<fo:block>cell 1.2</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.5mm"         border-style="dotted"  border-color="yellow">
<fo:block>cell 1.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell border-width="0.5mm"         border-style="dashed"  border-color="green">
<fo:block>cell 2.1</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.2mm"         border-style="dotted"  border-color="blue">
<fo:block>cell 2.2</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.5mm"         border-style="solid"   border-color="green">
<fo:block>cell 2.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell border-width="0.5mm"         border-style="dotted"  border-color="yellow">
<fo:block>cell 3.1</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.5mm"         border-style="solid"   border-color="green">
<fo:block>cell 3.2</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.5mm"         border-style="dashed"  border-color="yellow">
<fo:block>cell 3.3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>

<fo:block font-size="11pt" font-family="sans-serif" line-height="13pt" text-align="start">table border - cell 0</fo:block>
<fo:block>
<fo:table space-after.optimum="13pt" space-before.optimum="3pt" border-color="red" border-width="1.0mm" border-style="solid" font-size="10pt" font-family="sans-serif" text-align="start">
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-body>
<fo:table-row keep-with-next="always">
<fo:table-cell >
<fo:block>cell 1.1</fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block>cell 1.2</fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block>cell 1.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell >
<fo:block>cell 2.1</fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block>cell 2.2</fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block>cell 2.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell >
<fo:block>cell 3.1</fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block>cell 3.2</fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block>cell 3.3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>

<fo:block font-size="11pt" font-family="sans-serif" line-height="13pt" text-align="start">table 0 - cell border</fo:block>
<fo:block>
<fo:table space-after.optimum="13pt" space-before.optimum="3pt" border-color="red" font-size="10pt" font-family="sans-serif" text-align="start">
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-body>
<fo:table-row keep-with-next="always">
<fo:table-cell border-width="0.5mm"            border-style="solid"   border-color="yellow">
<fo:block>cell 1.1</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.5mm"            border-style="dashed"  border-color="green">
<fo:block>cell 1.2</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.5mm"            border-style="dotted"  border-color="yellow">
<fo:block>cell 1.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell border-width="0.5mm"            border-style="dashed"  border-color="green">
<fo:block>cell 2.1</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.2mm"            border-style="dotted"  border-color="blue">
<fo:block>cell 2.2</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.5mm"            border-style="solid"   border-color="green">
<fo:block>cell 2.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell border-width="0.5mm"            border-style="dotted"  border-color="yellow">
<fo:block>cell 3.1</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.5mm"            border-style="solid"   border-color="green">
<fo:block>cell 3.2</fo:block>
</fo:table-cell>
<fo:table-cell border-width="0.5mm"            border-style="dashed"  border-color="yellow">
<fo:block>cell 3.3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>

<fo:block font-size="11pt" font-family="sans-serif" line-height="13pt" text-align="start">table borders - cell borders dependent from position</fo:block>
<fo:block>
<fo:table space-after.optimum="13pt" space-before.optimum="3pt" border-color="red" border-width="1.0mm" border-style="solid" font-size="10pt" font-family="sans-serif" text-align="start">
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-column column-width="30mm" />
<fo:table-body>
<fo:table-row keep-with-next="always">
<fo:table-cell border-style="solid" border-top-width="0.0mm" border-bottom-width="0.5mm" border-left-width="0.0mm" border-right-width="0.5mm">
<fo:block>cell 1.1</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-top-width="0.0mm" border-bottom-width="0.5mm" border-left-width="0.5mm" border-right-width="0.5mm">
<fo:block>cell 1.2</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-top-width="0.0mm" border-bottom-width="0.5mm" border-left-width="0.5mm" border-right-width="0.0mm">
<fo:block>cell 1.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell border-style="solid" border-top-width="0.0mm" border-bottom-width="0.5mm" border-left-width="0.0mm" border-right-width="0.5mm">
<fo:block>cell 2.1</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-top-width="0.2mm" border-bottom-width="0.5mm" border-left-width="0.5mm" border-right-width="0.5mm">
<fo:block>cell 2.2</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-top-width="0.5mm" border-bottom-width="0.5mm" border-left-width="0.5mm" border-right-width="0.0mm">
<fo:block>cell 2.3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-next="always">
<fo:table-cell border-style="solid" border-top-width="0.5mm" border-bottom-width="0.0mm" border-left-width="0.0mm" border-right-width="0.5mm">
<fo:block>cell 3.1</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-top-width="0.5mm" border-bottom-width="0.0mm" border-left-width="0.5mm" border-right-width="0.5mm">
<fo:block>cell 3.2</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-top-width="0.5mm" border-bottom-width="0.0mm" border-left-width="0.5mm" border-right-width="0.0mm">
<fo:block>cell 3.3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>

</fo:flow>
</fo:page-sequence>
</fo:root>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to