Hi, all,

I think I found a bug in table rendering.

Consider the following simple FO file:

<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
 <fo:layout-master-set>
<fo:simple-page-master master-name="simple" page-height="11in" page-width="8.5in" margin-top="1in" margin-bottom="1in" margin-left="1in" margin-right="1in">
     <fo:region-body margin-top="1in"/>
     <fo:region-before extent="1in"/>
     <fo:region-after extent="1in"/>
   </fo:simple-page-master>
 </fo:layout-master-set>
 <fo:page-sequence master-reference="simple">
   <fo:flow flow-name="xsl-region-body">
<fo:table border-left-style="solid" border-style="solid" border-width="0.5pt" border-color="black" table-layout="fixed" width="100%">
       <fo:table-column column-width="1in"/>
       <fo:table-column column-width="6in"/>
       <fo:table-body>
         <fo:table-row>
<fo:table-cell border-style="solid" border-width="0.5pt" border-color="black"> <fo:block><fo:inline font-style="italic">Italics</fo:inline></fo:block>
           </fo:table-cell>
<fo:table-cell border-style="solid" border-width="0.5pt" border-color="black"> <fo:block>Italics represent placeholders in commands and options for context-sensitive values like file names, device types and names, numeric values, etc. Chapter and section names are italicized when referenced in the text as well.</fo:block>
           </fo:table-cell>
         </fo:table-row>
         <fo:table-row>
<fo:table-cell border-style="solid" border-width="0.5pt" border-color="black">
             <fo:block>
<fo:block><fo:inline font-family="monospace">Courier</fo:inline></fo:block>
             </fo:block>
           </fo:table-cell>
<fo:table-cell border-style="solid" border-width="0.5pt" border-color="black">
             <fo:block>
<fo:block>Courier is used for literal commands and options, and output from the computer.</fo:block>
             </fo:block>
           </fo:table-cell>
         </fo:table-row>
       </fo:table-body>
     </fo:table>
   </fo:flow>
 </fo:page-sequence>
</fo:root>

When rendered to PDF, the table border stops at the margin, but the cell (both text and border) continues to the width of the table cell (which extends beyond the margin). The result is a line through the text at the page margin and incorrectly thin lines.

The problem can be solved by ensuring that the column widths do not add up to more than the width of the page minus its margins. I've done that for my client in XSLT. The OpenOffice source we're converting to DocBook had some tables that were wider than the page minus its margins, so I forced the last column to fit the margin. Consequently, the problem isn't a show-stopper.

However, it seems to me that theres' a bug here. I think FOP should either stop both the table boundary and the cell boundary at the margin or let both go to the width specified by the total of the column widths, even if that violates the margin. (I would prefer the latter.)

Other than that, FOP 0.92beta is working fine for my newest client (so far, anyway - we're not done with all the customizations yet).

Thanks

Jay Bryant
Bryant Communication Services


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to