Hi Jeremias

I am using Adobe Reader 9.3.4 and I can see the "Smooth Line Art" option in
the preferences, but it is always greyed out (and checked!). It seems to be
a forced setting regardless of the "Smooth text" setting: none, monitor, or
laptop/LCD. None of these alternatives seem to make any difference to what
is displayed. Itried playing with the other settings on that page but they
didn't help either.

You are correct that when I send the document to the printer the grey
regions do not have gaps, hooray! But I noticed another problem (less
apparent on the screen), which is that there is a tiny grey dot in the side
border at each block boundary. Presumably a black border-left and a grey
border-top are competing, and the top border is winning the corner. Is there
a technique for making the side border take precedence to avoid this?

Cheers
T

-----Original Message-----
From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
Sent: Tuesday, 31 August 2010 7:29 a.m.
To: fop-users@xmlgraphics.apache.org
Subject: Re: edge effects with consecutive colored blocks

Trevor, try turning off "Smooth Line Art" in Acrobat Reader (Preferences,
Page Display). If the effects go away, you'll know that it's
anti-aliasing that causes this. I'll bet it's that but we can't do much
about it. Won't happen in print. HTH

On 30.08.2010 21:05:15 Trevor Nicholls wrote:
> Hi
> 
> Where my input XML contains "fragment" elements I am generating fo:blocks
> with a grey background and black border. Consecutive fragments are
coalesced
> into what looks like a single block with one outer border (but they need
to
> be separate fo:blocks so that page breaks occur at a block boundary). 
> 
> This is working, but I am getting some edge effects. These are apparent as
> faint ghostly lines where the block boundaries occur - these must be due
to
> some sort of rounding/floating arithmetic as they do not appear
consistently
> at every boundary nor do they appear consistently on all
> screens/resolutions.
> 
> I presume I am not the first person to see this kind of artefact, but
Google
> hasn't helped me find a solution. Can anyone here help me? Do I need to
> overlay the blocks somehow (and how does one do that anyway)?
> 
> Thanks for any hints
> Trevor
> 
> ===
> 
> The relevant xsl-fo templates are these:
> 
>   <xsl:attribute-set name="fragment.base.set">
>     <xsl:attribute name="font-family">Courier, monospace</xsl:attribute>
>     <xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
>     <xsl:attribute name="white-space-collapse">false</xsl:attribute>
>     <xsl:attribute name="keep-together.within-page">always</xsl:attribute>
>     <xsl:attribute name="font-size">9pt</xsl:attribute>
>     <xsl:attribute name="background-color">#e0e0e0</xsl:attribute>
>     <xsl:attribute name="padding-before">3pt</xsl:attribute>
>     <xsl:attribute name="padding-after">3pt</xsl:attribute>
>     <xsl:attribute name="padding-start">6pt</xsl:attribute>
>     <xsl:attribute name="padding-end">6pt</xsl:attribute>
>     <xsl:attribute name="margin">0</xsl:attribute>
>     <xsl:attribute name="border-style">solid</xsl:attribute>
>     <xsl:attribute name="border-width">0.25mm</xsl:attribute>
>   </xsl:attribute-set>
>   
>   <xsl:attribute-set name="fragment.set"
> use-attribute-sets="fragment.base.set">
>     <xsl:attribute name="border-color">black</xsl:attribute>
>     <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
>     <xsl:attribute name="space-before.optimum">0.5em</xsl:attribute>
>     <xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
>     <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
>     <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute>
>     <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute>
>   </xsl:attribute-set>
>   
>   <xsl:attribute-set name="fragment.top.set"
> use-attribute-sets="fragment.base.set">
>     <xsl:attribute name="border-top-color">black</xsl:attribute>
>     <xsl:attribute name="border-left-color">black</xsl:attribute>
>     <xsl:attribute name="border-right-color">black</xsl:attribute>
>     <xsl:attribute name="border-bottom-color">#e0e0e0</xsl:attribute>
>     <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
>     <xsl:attribute name="space-before.optimum">0.5em</xsl:attribute>
>     <xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
>     <xsl:attribute name="space-after">0em</xsl:attribute>
>   </xsl:attribute-set>
>   
>   <xsl:attribute-set name="fragment.middle.set"
> use-attribute-sets="fragment.base.set">
>     <xsl:attribute name="border-top-color">#e0e0e0</xsl:attribute>
>     <xsl:attribute name="border-left-color">black</xsl:attribute>
>     <xsl:attribute name="border-right-color">black</xsl:attribute>
>     <xsl:attribute name="border-bottom-color">#e0e0e0</xsl:attribute>
>     <xsl:attribute name="space-before">0em</xsl:attribute>
>     <xsl:attribute name="space-after">0em</xsl:attribute>
>   </xsl:attribute-set>
>   
>   <xsl:attribute-set name="fragment.bottom.set"
> use-attribute-sets="fragment.base.set">
>     <xsl:attribute name="border-top-color">#e0e0e0</xsl:attribute>
>     <xsl:attribute name="border-left-color">black</xsl:attribute>
>     <xsl:attribute name="border-right-color">black</xsl:attribute>
>     <xsl:attribute name="border-bottom-color">black</xsl:attribute>
>     <xsl:attribute name="space-before">0em</xsl:attribute>
>     <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
>     <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute>
>     <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute>
>   </xsl:attribute-set>
>   
>   <xsl:template
> match="fragment[not(preceding-sibling::*[1][self::fragment])]">
>     <xsl:apply-templates select="." mode="inlist" />
>   </xsl:template>
> 
>   <xsl:template match="fragment" mode="inlist">
>     <xsl:choose>
>       <xsl:when test="not(preceding-sibling::*[1][self::fragment])">
>         <xsl:choose>
>           <xsl:when test="not(following-sibling::*[1][self::fragment])">
>             <!-- sole fragment -->
>             <fo:block xsl:use-attribute-sets="fragment.set" >
>               <xsl:apply-templates />
>             </fo:block>
>           </xsl:when>
>           <xsl:otherwise>
>             <!-- first fragment -->
>             <fo:block xsl:use-attribute-sets="fragment.top.set" >
>               <xsl:apply-templates />
>             </fo:block>
>           </xsl:otherwise>
>         </xsl:choose>
>       </xsl:when>
>       <xsl:otherwise>
>         <xsl:choose>
>           <xsl:when test="not(following-sibling::*[1][self::fragment])">
>             <!-- last fragment -->
>             <fo:block xsl:use-attribute-sets="fragment.bottom.set" >
>               <xsl:apply-templates />
>             </fo:block>
>           </xsl:when>
>           <xsl:otherwise>
>             <!-- middle fragment -->
>             <fo:block xsl:use-attribute-sets="fragment.middle.set" >
>               <xsl:apply-templates />
>             </fo:block>
>           </xsl:otherwise>
>         </xsl:choose>
>       </xsl:otherwise>
>     </xsl:choose>
>     <xsl:apply-templates select="following-sibling::*[1][self::fragment]"
> mode="inlist" />
>   </xsl:template>
> 
> 



Jeremias Maerki


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


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

Reply via email to