Re: Dual Column Layout

2005-02-02 Thread Jeremias Maerki
It's going to be rewritten from scratch because the layout code is all
new. Just don't ask when this is going to happen. :-) We would be glad
to accept any help. It could speed up the process.

On 02.02.2005 22:53:20 Puppala, Kumar (LNG-DAY) wrote:
> Is the algorithm for column-balancing
> going to be change in the next release to make it work more accurately? 


Jeremias Maerki



RE: Dual Column Layout

2005-02-02 Thread Puppala, Kumar (LNG-DAY)
J.Pietschmann,
Thanks for your response. Is the algorithm for column-balancing
going to be change in the next release to make it work more accurately? 

Thanks,
Kumar Puppala


-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 02, 2005 3:54 PM
To: fop-dev@xml.apache.org
Subject: Re: Dual Column Layout

Puppala, Kumar (LNG-DAY) wrote:
> I am having difficulty understanding how the dual column layout is
> implemented in FOP.
> 
> Scenario 1:
> I set the property column-count="2" on my fo:region-body object. As such
the
> text appears in dual column format. If I have the page totally filled out,
> then everything seems to be fine. But if my document does not contain
enough
> text (usually the last page in my document), the text does not seem to be
> evenly distributed in both the columns. It first tries to fill the left
> column and then tries to fill the right column if there is an additional
> text.

As mandated by the spec.

> If this page is the last page and we don't have any additional text,
> the renderer should try to distribute it evenly on both columns. That is
the
> behavior I have seem on other viewers.

This can be forced by adding an empty block with span="all" at the
end of the flow.


> Scenario 2:
> If I keep switching between dual and single columns on the same page (
using
> the span="all" property on an fo:block within a page), the distribution
> between the columns seems to be happening but does not happen accurately.
I
> see more text on the left hand column than on the right hand column. Doing
> this would leave additional blank space on the right hand column before we
> switch to single column layout.

This is due to a simple algorithm for balancing. Getting column
balancing even somewhat right is quite complicated.

J.Pietschmann


Re: Dual Column Layout

2005-02-02 Thread J.Pietschmann
Puppala, Kumar (LNG-DAY) wrote:
I am having difficulty understanding how the dual column layout is
implemented in FOP.
Scenario 1:
I set the property column-count="2" on my fo:region-body object. As such the
text appears in dual column format. If I have the page totally filled out,
then everything seems to be fine. But if my document does not contain enough
text (usually the last page in my document), the text does not seem to be
evenly distributed in both the columns. It first tries to fill the left
column and then tries to fill the right column if there is an additional
text.
As mandated by the spec.
If this page is the last page and we don't have any additional text,
the renderer should try to distribute it evenly on both columns. That is the
behavior I have seem on other viewers.
This can be forced by adding an empty block with span="all" at the
end of the flow.

Scenario 2:
If I keep switching between dual and single columns on the same page ( using
the span="all" property on an fo:block within a page), the distribution
between the columns seems to be happening but does not happen accurately. I
see more text on the left hand column than on the right hand column. Doing
this would leave additional blank space on the right hand column before we
switch to single column layout.
This is due to a simple algorithm for balancing. Getting column
balancing even somewhat right is quite complicated.
J.Pietschmann


Dual Column Layout

2005-02-02 Thread Puppala, Kumar (LNG-DAY)
I am having difficulty understanding how the dual column layout is
implemented in FOP.

Scenario 1:
I set the property column-count="2" on my fo:region-body object. As such the
text appears in dual column format. If I have the page totally filled out,
then everything seems to be fine. But if my document does not contain enough
text (usually the last page in my document), the text does not seem to be
evenly distributed in both the columns. It first tries to fill the left
column and then tries to fill the right column if there is an additional
text. If this page is the last page and we don't have any additional text,
the renderer should try to distribute it evenly on both columns. That is the
behavior I have seem on other viewers.

Scenario 2:
If I keep switching between dual and single columns on the same page ( using
the span="all" property on an fo:block within a page), the distribution
between the columns seems to be happening but does not happen accurately. I
see more text on the left hand column than on the right hand column. Doing
this would leave additional blank space on the right hand column before we
switch to single column layout.

Can someone help me in understanding this behavior and if there is anything
I can do to fix it?

Thanks,
Kumar Puppala