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 ruud grosmann <r....@gmail.com> on 2008/11/02 15:21:54 UTC
table cell border problem
hi list,
in one of my first attemts to use xslfo, I got stuck in a silly
problem with table cells. Whatever I try or whatever I google and
read, I get no answer.
The problem is this:
I try to create a table that has white or black cells, similar to a
crossword puzzle. However, when I make a fo file for this, the black
cells contain some grey shade in it.
I use fop-0.94, java 1.5.0 on a debian machine.
I have made this minimal sample:
<?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 page-width="62mm"
page-height="48mm"
margin-top="5mm" margin-left="5mm"
margin-right="5mm" margin-bottom="5mm"
master-name="PageMaster">
<fo:region-body margin-top="5mm" margin-left="0mm"
margin-right="0mm" margin-bottom="10mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence initial-page-number="1" master-reference="PageMaster">
<fo:flow flow-name="xsl-region-body">
<fo:block space-before="1em">
<fo:table>
<fo:table-column column-width="5mm"/>
<fo:table-column column-width="15mm"/>
<fo:table-column column-width="15mm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border-style='solid'>
<fo:block/>
</fo:table-cell>
<fo:table-cell border-style='solid' background-color='black'>
<fo:block font-weight="bold" color='white'
padding-top='1mm' font-size='10pt'>border,</fo:block>
</fo:table-cell>
<fo:table-cell border-style='solid' background-color='black'>
<fo:block font-weight="bold" color='white'
padding-top='1mm' font-size='10pt'>or not?</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
I really don't know where I should start; is it the fo itself that is
causing this, or is it th FO engine?
I have attached a screenshot from a magnified portion of the pdf....
Please forgive me if this is a faq; any pointers welcome!
thanks, Ruud
Re: table cell border problem
Posted by ruud grosmann <r....@gmail.com>.
thanks for the quick response, Jeremias.
So it is not a problem with the FO; I'm very glad for that.
regards, Ruud
On 02/11/2008, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> This is an anti-aliasing side-effect of your PDF viewer. Check if you
> can disable anti-aliasing (in Acrobat Reader, the setting's called
> "Smooth line art"). In print, this should not happen.
>
> Note to fop-devs: I guess we may need to start thinking about how to
> avoid these side-effects (most probably by gathering all border segments
> of a table together before painting). This has come up a number of times
> now. Ideas, patches, all welcome. But I don't think this will be easy.
>
> On 02.11.2008 15:21:54 ruud grosmann wrote:
>> hi list,
>>
>> in one of my first attemts to use xslfo, I got stuck in a silly
>> problem with table cells. Whatever I try or whatever I google and
>> read, I get no answer.
>>
>> The problem is this:
>> I try to create a table that has white or black cells, similar to a
>> crossword puzzle. However, when I make a fo file for this, the black
>> cells contain some grey shade in it.
>> I use fop-0.94, java 1.5.0 on a debian machine.
>>
>> I have made this minimal sample:
>>
>> <?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 page-width="62mm"
>> page-height="48mm"
>> margin-top="5mm" margin-left="5mm"
>> margin-right="5mm" margin-bottom="5mm"
>> master-name="PageMaster">
>> <fo:region-body margin-top="5mm" margin-left="0mm"
>> margin-right="0mm" margin-bottom="10mm"/>
>> </fo:simple-page-master>
>> </fo:layout-master-set>
>> <fo:page-sequence initial-page-number="1" master-reference="PageMaster">
>> <fo:flow flow-name="xsl-region-body">
>> <fo:block space-before="1em">
>>
>> <fo:table>
>> <fo:table-column column-width="5mm"/>
>> <fo:table-column column-width="15mm"/>
>> <fo:table-column column-width="15mm"/>
>>
>> <fo:table-body>
>> <fo:table-row>
>> <fo:table-cell border-style='solid'>
>> <fo:block/>
>> </fo:table-cell>
>> <fo:table-cell border-style='solid' background-color='black'>
>> <fo:block font-weight="bold" color='white'
>> padding-top='1mm' font-size='10pt'>border,</fo:block>
>> </fo:table-cell>
>> <fo:table-cell border-style='solid' background-color='black'>
>> <fo:block font-weight="bold" color='white'
>> padding-top='1mm' font-size='10pt'>or not?</fo:block>
>> </fo:table-cell>
>> </fo:table-row>
>> </fo:table-body>
>> </fo:table>
>> </fo:block>
>> </fo:flow>
>> </fo:page-sequence>
>> </fo:root>
>>
>> I really don't know where I should start; is it the fo itself that is
>> causing this, or is it th FO engine?
>> I have attached a screenshot from a magnified portion of the pdf....
>>
>> Please forgive me if this is a faq; any pointers welcome!
>>
>> thanks, Ruud
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: table cell border problem
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
This is an anti-aliasing side-effect of your PDF viewer. Check if you
can disable anti-aliasing (in Acrobat Reader, the setting's called
"Smooth line art"). In print, this should not happen.
Note to fop-devs: I guess we may need to start thinking about how to
avoid these side-effects (most probably by gathering all border segments
of a table together before painting). This has come up a number of times
now. Ideas, patches, all welcome. But I don't think this will be easy.
On 02.11.2008 15:21:54 ruud grosmann wrote:
> hi list,
>
> in one of my first attemts to use xslfo, I got stuck in a silly
> problem with table cells. Whatever I try or whatever I google and
> read, I get no answer.
>
> The problem is this:
> I try to create a table that has white or black cells, similar to a
> crossword puzzle. However, when I make a fo file for this, the black
> cells contain some grey shade in it.
> I use fop-0.94, java 1.5.0 on a debian machine.
>
> I have made this minimal sample:
>
> <?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 page-width="62mm"
> page-height="48mm"
> margin-top="5mm" margin-left="5mm"
> margin-right="5mm" margin-bottom="5mm"
> master-name="PageMaster">
> <fo:region-body margin-top="5mm" margin-left="0mm"
> margin-right="0mm" margin-bottom="10mm"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence initial-page-number="1" master-reference="PageMaster">
> <fo:flow flow-name="xsl-region-body">
> <fo:block space-before="1em">
>
> <fo:table>
> <fo:table-column column-width="5mm"/>
> <fo:table-column column-width="15mm"/>
> <fo:table-column column-width="15mm"/>
>
> <fo:table-body>
> <fo:table-row>
> <fo:table-cell border-style='solid'>
> <fo:block/>
> </fo:table-cell>
> <fo:table-cell border-style='solid' background-color='black'>
> <fo:block font-weight="bold" color='white'
> padding-top='1mm' font-size='10pt'>border,</fo:block>
> </fo:table-cell>
> <fo:table-cell border-style='solid' background-color='black'>
> <fo:block font-weight="bold" color='white'
> padding-top='1mm' font-size='10pt'>or not?</fo:block>
> </fo:table-cell>
> </fo:table-row>
> </fo:table-body>
> </fo:table>
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
>
> I really don't know where I should start; is it the fo itself that is
> causing this, or is it th FO engine?
> I have attached a screenshot from a magnified portion of the pdf....
>
> Please forgive me if this is a faq; any pointers welcome!
>
> thanks, Ruud
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org