Green wrote:

Hi

I am new to this mailing list (also fop user mailing list too),
although I have been using FOP for about a year.

Anyway, I had a small problem with dots leader, they did not line up at the end, and the gap is less than one dot. But still my client didn't like it. (I am using FOP-0.20.5 July 15, 2003 build version)

My  stylesheet like this

<xsl:template match="tableContents">
<fo:table table-layout="fixed">
<fo:table-column column-width="90mm"/>
<fo:table-column column-width="10mm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block text-align-last="justify"
font-size="11.08pt" font-family="Bell Gothic Bold"
font-weight="bold">
Result 1
<fo:leader leader-pattern="dots"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" margin-right="-1.3mm">
<fo:block font-size="11.08pt" font-family="Bell Gothic Bold" font-weight="bold">
<fo:page-number-citation ref-id="R1" />
</fo:block>
</fo:table-cell>
</fo:table-row>
<xsl:for-each select="AppendixPageContent">
<xsl:call-template name="addtionalTableContents"/>
</xsl:for-each>


.... more contents

        </fo:table-body>
    </fo:table>
</xsl:template>

<xsl:template name="addtionalTableContents">
    <fo:table-row>
        <fo:table-cell>
            <fo:block text-align-last="justify" font-size="11.08pt"
             font-family="Bell Gothic Bold" font-weight="bold" >
                 &#160;&#160;&#160;&#160;&#160;<xsl:value-of
                 select="value"/>&#160;<fo:leader  leader-pattern="dots"/>
             </fo:block>
        </fo:table-cell>
        <fo:table-cell>
            <fo:block text-align="end" font-size="11.08pt"
                font-family="Bell Gothic Bold" font-weight="bold">
            <xsl:value-of select="page"/></fo:block>
        </fo:table-cell>
   </fo:table-row>
</xsl:template>


(margin-right for page-number-citation cell is to adjust with the other page numbers from addtionalTableContents)

Some dots leader didn't reach to the table cell end, i.e.
they don't line up. If dots change to rule, it is fine.

So I look at the source code src.org.apache.fop.layout.LineArea.jave that generate leaders.
From line 205, it is generating leader.

LineArea.java is a nightmare in 0.20.5

<snip/>

factor is the number how many dots can be fit in the space.
and added it to children and add left space as "space"
So, the dot line end did not line up.
First I tried to replace the order InlineSpace and leaderPatterArea but it didn't work (nothing changed)


So, I generated additional WordArea using 1pt space and added before dot
leader. The source is like this.

The design of 0.20.5 was so bad that we decided a re-write was the best way forward. We have made some good progress with the re-write, so now we will no longer be making any changes to the old 0.20.5 code. If you want to contribute to FOP, perhaps you should download the new code and test your FO there.


<snip/>

Chris



Reply via email to