[ 
https://issues.apache.org/jira/browse/FOP-1444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13796921#comment-13796921
 ] 

Alexey Neyman commented on FOP-1444:
------------------------------------

Pascal:

1. You didn't really answer the question whether FOP's treatment of whitespace 
around fo:leader is a bug or intended behavior. By the fact that DocBook 
stylesheets do that even in the latest release (1.78.1), I'd say it's a bug in 
FOP (see the explicit <xsl:text> inserting a space below):

<xsl:template name="toc.line">
  ...
    <fo:inline keep-together.within-line="always">
      <xsl:text> </xsl:text>
      <fo:leader leader-pattern="dots"
                 leader-pattern-width="3pt"
                 leader-alignment="reference-area"
                 keep-with-next.within-line="always"/>
      <xsl:text> </xsl:text>
      <fo:basic-link internal-destination="{$id}">
        <fo:page-number-citation ref-id="{$id}"/>
      </fo:basic-link>
    </fo:inline>

2. I've regenerated the .fo using the stylesheets we use (that avoid placing 
space around fo:leader) and the resulting PDF has the numbers perfectly 
aligned. See attached PDF. Here's what we use for toc.line (note there's no 
<xsl:text> with space; padding-* properties are used instead):

       <fo:inline keep-together.within-line="always">
        <fo:leader padding-left="4pt" padding-right="4pt" leader-pattern="dots" 
leader-pattern-width="3pt"
         leader-alignment="reference-area" keep-with-next.within-line="always"/>
        <fo:basic-link internal-destination="{$id}">
         <fo:page-number-citation ref-id="{$id}"/>
        </fo:basic-link>
       </fo:inline>


> PDF table of contents generated with incorrect page number alignments
> ---------------------------------------------------------------------
>
>                 Key: FOP-1444
>                 URL: https://issues.apache.org/jira/browse/FOP-1444
>             Project: Fop
>          Issue Type: Bug
>          Components: pdf
>    Affects Versions: 0.94, trunk
>         Environment: Operating System: Windows XP
> Platform: PC
>            Reporter: David H. Gutteridge
>         Attachments: FOP_TOC_Bug_Test.dbk, FOP_TOC_Bug_Test.fo, 
> FOP_TOC_Bug_Test.pdf
>
>
> It seems there's a threshold where FOP does not align page number references
> correctly when generating tables of contents in PDF documents.  I see that you
> have a reference to this in your FAQ (question 3.10), but it says "The most
> recent FOP releases should have this problem fixed", I'm seeing this problem
> with 0.94.
> (I have a sample FO document I will attach, looks like the initial bug 
> reporting
> interface doesn't let me do this.)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to