xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Bug in table rendering (version 0.92beta)
Date Mon, 06 Nov 2006 13:35:31 GMT
Bug confirmed and fixed in FOP Trunk. We did not respect the rule: "The
width of the table is then the greater of the value of the 'width'
property for the table element and the sum of the column widths (plus
cell spacing or borders)." from
http://www.w3.org/TR/REC-CSS2/tables.html#width-layout for fixed table
layout.

Change:
http://svn.apache.org/viewvc?view=rev&rev=471725

What I haven't fixed, yet, is that the remaining room is to be
distributed among columns if the sum of columns is less than the table
width in fixed table layout.

On 03.11.2006 01:47:05 Jay Bryant wrote:
> 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 


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message