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 Vincent Hennebert <vh...@gmail.com> on 2008/09/29 18:40:53 UTC

Re: Setting a different border style on particular table cells [was: table border irregularity]

Hi Laurent,

Laurent Morel wrote:
> Vincent Hennebert a écrit :
>> FOP definitely paints borders over backgrounds; what you’re seeing is
>> a rendering defect of your PDF viewer, partly due to the relatively big
>> size of pixels on monitors. The printed document should look ok.
>>   
> I have a table related question about that :
> Is that expected that a cell border, once defined as say "1pt solid" at
> a high level
> in the XML hierarchy, can't be redefined as "none" at lower levels ?
> The only way I found to "erase" a border is to change its color to white
> (which is
> not always possible).
> 
> Consider a 50 lines tables like this :
> 
>        +------+
>        | col2 |
> +------+------+
> | foo  | bar  |
> +------+------+
> | foo  | bar  |
> +------+------+
> | foo  | bar  |
> +------+------+
> | foo  | bar  |
> ...
> | foo  | bar  |
> +------+------+
> 
> I would like to specify that all columns
> have left and right borders, except for the first line.
> 
> Thus the table could start with :
> <fo:table-column border="1pt solid">
> <fo:table-body>
>   <fo:table-row border="1pt solid">
>     <fo:table-cell border-left="none" border-top="none">
> but this does not work on fop 0.95.
> 
> Thus I have to specify the left border on each first cell
> (first row excepted), and this is annoyning...
> 
> Would you recommend a solution for this problem ?

Use border-*-style="hidden" instead of "none". This gives the border
precedence over any other (here, the borders specified on the enclosing
table-row and table-column elements). "none" gives the lowest priority,
so if other elements specify borders they will be selected instead.

HTH,
Vincent

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