You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Alexey Neyman <st...@att.net> on 2013/11/14 20:16:24 UTC

[PATCH] Re: Incorrect leaders at FOP example

[CC'ed fop-dev - please review/commit the patch]

Hi Ognjen,

On Thursday, November 14, 2013 09:09:21 AM Ognjen Blagojevic wrote:
> Alexey,
> 
> On 13.11.2013 21:46, Alexey Neyman wrote:
> > On Wednesday, November 13, 2013 03:21:47 am Ognjen Blagojevic wrote:
> >> I need to create leaders for TOC. I started with researching FOP
> >> examples (examples/fo/basic/leaders.fo), but the generated PDF doesn't
> >> contain expected results.
> 
> (...)
> 
> >> Are my expectations too high?
> > 
> > Hard to say, since you didn't attach neither sample FO code, nor the
> > resulting PDF. Leaders work for me with 1.1 on multiple Java versions,
> > 1.6.x and 1.7.x.
> Thank you for taking look at this.
> 
> I was testing with unmodified leader.fo example which is part of the FOP
> distro. Here is FO file based on that example, and the resulting PDF. I
> used FOP 1.1, Oracle JDK 1.7.0_40-b43 on Windows 7 64-bit (also other
> FOP versions and OSes, but the result is always the same).

It seems the leader.fo example lacks the text-align-last="justify" property on 
the enclosing block. Because of that, FOP assumes the same alignment ("start") 
on the line containing the leader and does not extend the leader to the end 
boundary of the reference area. See the attached diff - this makes the leaders 
work fine.

FOP developers, could someone review/commit the attached diff?

Regards,
Alexey.

> 
> > Here's an example fo:leader I am using:
> >   <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"/>
> 
> The only difference I notice to FO file I attached are attributes
> keep-with-next.within-line, padding-left and padding-right. Adding them
> to attached example does not solve the problem in the resulting PDF.
> 
> -Ognjen

Re: [PATCH] Re: Incorrect leaders at FOP example

Posted by Alexey Neyman <st...@att.net>.
Hi Chris,

It is now [1].

I didn't know the patch submissions must go through Jira, though: [2] says it 
is perfectly okay to do patch submissions via fop-dev@ mailing list. Someone 
needs to update that page to describe the guidelines.

[1] https://issues.apache.org/jira/browse/FOP-2315
[2] http://xmlgraphics.apache.org/fop/dev/index.html#mail-fop-dev

Regards,
Alexey.

On Tuesday, November 19, 2013 01:43:27 PM Chris Bowditch wrote:
> Hi Alexey,
> 
> Thanks for the contribution. Has the patch been attached to a JIRA
> Issue? The development team don't go looking into the mailing list
> archives when processing patches.
> 
> Thanks,
> 
> Chris
> 
> On 18/11/2013 19:59, Alexey Neyman wrote:
> > [Patch ping]
> > 
> > On Thursday, November 14, 2013 11:16:24 AM Alexey Neyman wrote:
> >> [CC'ed fop-dev - please review/commit the patch]
> >> 
> >> Hi Ognjen,
> >> 
> >> On Thursday, November 14, 2013 09:09:21 AM Ognjen Blagojevic wrote:
> >>> Alexey,
> >>> 
> >>> On 13.11.2013 21:46, Alexey Neyman wrote:
> >>>> On Wednesday, November 13, 2013 03:21:47 am Ognjen Blagojevic wrote:
> >>>>> I need to create leaders for TOC. I started with researching FOP
> >>>>> examples (examples/fo/basic/leaders.fo), but the generated PDF doesn't
> >>>>> contain expected results.
> >>> 
> >>> (...)
> >>> 
> >>>>> Are my expectations too high?
> >>>> 
> >>>> Hard to say, since you didn't attach neither sample FO code, nor the
> >>>> resulting PDF. Leaders work for me with 1.1 on multiple Java versions,
> >>>> 1.6.x and 1.7.x.
> >>> 
> >>> Thank you for taking look at this.
> >>> 
> >>> I was testing with unmodified leader.fo example which is part of the FOP
> >>> distro. Here is FO file based on that example, and the resulting PDF. I
> >>> used FOP 1.1, Oracle JDK 1.7.0_40-b43 on Windows 7 64-bit (also other
> >>> FOP versions and OSes, but the result is always the same).
> >> 
> >> It seems the leader.fo example lacks the text-align-last="justify"
> >> property
> >> on the enclosing block. Because of that, FOP assumes the same alignment
> >> ("start") on the line containing the leader and does not extend the
> >> leader
> >> to the end boundary of the reference area. See the attached diff - this
> >> makes the leaders work fine.
> >> 
> >> FOP developers, could someone review/commit the attached diff?
> >> 
> >> Regards,
> >> Alexey.
> >> 
> >>>> Here's an example fo:leader I am using:
> >>>>    <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"/>
> >>> 
> >>> The only difference I notice to FO file I attached are attributes
> >>> keep-with-next.within-line, padding-left and padding-right. Adding them
> >>> to attached example does not solve the problem in the resulting PDF.
> >>> 
> >>> -Ognjen


Re: [PATCH] Re: Incorrect leaders at FOP example

Posted by Chris Bowditch <bo...@hotmail.com>.
Hi Alexey,

Thanks for the contribution. Has the patch been attached to a JIRA 
Issue? The development team don't go looking into the mailing list 
archives when processing patches.

Thanks,

Chris

On 18/11/2013 19:59, Alexey Neyman wrote:
> [Patch ping]
>
> On Thursday, November 14, 2013 11:16:24 AM Alexey Neyman wrote:
>> [CC'ed fop-dev - please review/commit the patch]
>>
>> Hi Ognjen,
>>
>> On Thursday, November 14, 2013 09:09:21 AM Ognjen Blagojevic wrote:
>>> Alexey,
>>>
>>> On 13.11.2013 21:46, Alexey Neyman wrote:
>>>> On Wednesday, November 13, 2013 03:21:47 am Ognjen Blagojevic wrote:
>>>>> I need to create leaders for TOC. I started with researching FOP
>>>>> examples (examples/fo/basic/leaders.fo), but the generated PDF doesn't
>>>>> contain expected results.
>>> (...)
>>>
>>>>> Are my expectations too high?
>>>> Hard to say, since you didn't attach neither sample FO code, nor the
>>>> resulting PDF. Leaders work for me with 1.1 on multiple Java versions,
>>>> 1.6.x and 1.7.x.
>>> Thank you for taking look at this.
>>>
>>> I was testing with unmodified leader.fo example which is part of the FOP
>>> distro. Here is FO file based on that example, and the resulting PDF. I
>>> used FOP 1.1, Oracle JDK 1.7.0_40-b43 on Windows 7 64-bit (also other
>>> FOP versions and OSes, but the result is always the same).
>> It seems the leader.fo example lacks the text-align-last="justify" property
>> on the enclosing block. Because of that, FOP assumes the same alignment
>> ("start") on the line containing the leader and does not extend the leader
>> to the end boundary of the reference area. See the attached diff - this
>> makes the leaders work fine.
>>
>> FOP developers, could someone review/commit the attached diff?
>>
>> Regards,
>> Alexey.
>>
>>>> Here's an example fo:leader I am using:
>>>>    <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"/>
>>> The only difference I notice to FO file I attached are attributes
>>> keep-with-next.within-line, padding-left and padding-right. Adding them
>>> to attached example does not solve the problem in the resulting PDF.
>>>
>>> -Ognjen
>
>


Re: [PATCH] Re: Incorrect leaders at FOP example

Posted by Alexey Neyman <st...@att.net>.
[Patch ping]

On Thursday, November 14, 2013 11:16:24 AM Alexey Neyman wrote:
> [CC'ed fop-dev - please review/commit the patch]
> 
> Hi Ognjen,
> 
> On Thursday, November 14, 2013 09:09:21 AM Ognjen Blagojevic wrote:
> > Alexey,
> > 
> > On 13.11.2013 21:46, Alexey Neyman wrote:
> > > On Wednesday, November 13, 2013 03:21:47 am Ognjen Blagojevic wrote:
> > >> I need to create leaders for TOC. I started with researching FOP
> > >> examples (examples/fo/basic/leaders.fo), but the generated PDF doesn't
> > >> contain expected results.
> > 
> > (...)
> > 
> > >> Are my expectations too high?
> > > 
> > > Hard to say, since you didn't attach neither sample FO code, nor the
> > > resulting PDF. Leaders work for me with 1.1 on multiple Java versions,
> > > 1.6.x and 1.7.x.
> > 
> > Thank you for taking look at this.
> > 
> > I was testing with unmodified leader.fo example which is part of the FOP
> > distro. Here is FO file based on that example, and the resulting PDF. I
> > used FOP 1.1, Oracle JDK 1.7.0_40-b43 on Windows 7 64-bit (also other
> > FOP versions and OSes, but the result is always the same).
> 
> It seems the leader.fo example lacks the text-align-last="justify" property
> on the enclosing block. Because of that, FOP assumes the same alignment
> ("start") on the line containing the leader and does not extend the leader
> to the end boundary of the reference area. See the attached diff - this
> makes the leaders work fine.
> 
> FOP developers, could someone review/commit the attached diff?
> 
> Regards,
> Alexey.
> 
> > > Here's an example fo:leader I am using:
> > >   <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"/>
> > 
> > The only difference I notice to FO file I attached are attributes
> > keep-with-next.within-line, padding-left and padding-right. Adding them
> > to attached example does not solve the problem in the resulting PDF.
> > 
> > -Ognjen


Re: [PATCH] Re: Incorrect leaders at FOP example

Posted by Ognjen Blagojevic <og...@gmail.com>.
Alexey,
A Gian,

On 15.11.2013 1:13, A Gian wrote:
> It seems to me that Alexey's patch is the correct way to solve the issue

Alexey:
> It seems the leader.fo example lacks the text-align-last="justify" property on
> the enclosing block. Because of that, FOP assumes the same alignment ("start")
> on the line containing the leader and does not extend the leader to the end
> boundary of the reference area. See the attached diff - this makes the leaders
> work fine.

Yes, it does. I confirm that FOP example leader.fo works fine when 
aforementioned property is added. Thank you.

Regards,
Ognjen


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


RE: [PATCH] Re: Incorrect leaders at FOP example

Posted by A Gian <a....@hotmail.com>.


It seems to me that Alexey's patch is the correct way to solve the issue (adding text-align="justify" is also mentioned in  FOP's frequent asked questions http://xmlgraphics.apache.org/fop/faq.html#leader-expansion   ).  
From: stilor@att.net
To: fop-users@xmlgraphics.apache.org
CC: ognjen.d.blagojevic@gmail.com; fop-dev@xmlgraphics.apache.org
Subject: [PATCH] Re: Incorrect leaders at FOP example
Date: Thu, 14 Nov 2013 11:16:24 -0800

[CC'ed fop-dev - please review/commit the patch]
 
Hi Ognjen,
 
On Thursday, November 14, 2013 09:09:21 AM Ognjen Blagojevic wrote:
> Alexey,
> 
> On 13.11.2013 21:46, Alexey Neyman wrote:
> > On Wednesday, November 13, 2013 03:21:47 am Ognjen Blagojevic wrote:
> >> I need to create leaders for TOC. I started with researching FOP
> >> examples (examples/fo/basic/leaders.fo), but the generated PDF doesn't
> >> contain expected results.
> 
> (...)
> 
> >> Are my expectations too high?
> > 
> > Hard to say, since you didn't attach neither sample FO code, nor the
> > resulting PDF. Leaders work for me with 1.1 on multiple Java versions,
> > 1.6.x and 1.7.x.
> Thank you for taking look at this.
> 
> I was testing with unmodified leader.fo example which is part of the FOP
> distro. Here is FO file based on that example, and the resulting PDF. I
> used FOP 1.1, Oracle JDK 1.7.0_40-b43 on Windows 7 64-bit (also other
> FOP versions and OSes, but the result is always the same).
 
It seems the leader.fo example lacks the text-align-last="justify" property on 
the enclosing block. Because of that, FOP assumes the same alignment ("start") 
on the line containing the leader and does not extend the leader to the end 
boundary of the reference area. See the attached diff - this makes the leaders 
work fine.
 
FOP developers, could someone review/commit the attached diff?
 
Regards,
Alexey.
 
> 
> > Here's an example fo:leader I am using:
> >   <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"/>
> 
> The only difference I notice to FO file I attached are attributes
> keep-with-next.within-line, padding-left and padding-right. Adding them
> to attached example does not solve the problem in the resulting PDF.
> 
> -Ognjen

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