You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Abhijit Junnare <ma...@yahoo.com> on 2003/12/05 21:54:04 UTC

Bug with keep-together?

As FOP has keep-together implemented only for table
rows I am formatting some content in a table. Now I
have different margins for first page and rest of the
pages. I have some content which has keep-together set
to always and it should print on first page if it fits
in its entirety or should start on second page. It
does exactly that but the problem lies with the table
width. I have set the table-width for this
keep-together table to be 100%. I have 1in margins for
all sides on first page and 0.5in margins for the rest
of the pages. Now when the content is more than what
can be accommodated on the remaining part of the first
page, it prints to content on second page BUT it has
1.5 in margin on the right side. It is not exactly
margin but the table width is calculated as 100%
considering the 1in margins and so the rest of the
space on the right side is left blank when this table
is printed on the second page (0.5 in margin). 
I can say for sure that table width is calculated as
per the first page because except for this table the
content on second page has 0.5 in margin on all right
and left sides. So is this a bug? Should I specify the
table width something other than 100%?


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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


Re: Bug with keep-together?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Abhijit Junnare wrote:
> As FOP has keep-together implemented only for table
> rows I am formatting some content in a table. Now I
> have different margins for first page and rest of the
> pages. I have some content which has keep-together set
> to always and it should print on first page if it fits
> in its entirety or should start on second page. It
> does exactly that but the problem lies with the table
> width. I have set the table-width for this
> keep-together table to be 100%.

That's a bug with percentage resolution rather than with
keep-toghether. The percentage is resolved with respect
to the area where the table starts and is not recalculated
if the table spills into an area with a different width.
The same happens with basically all other percentages,
including widths on comon blocks.

You just have to avoid spreading blocks whose width involves
calculating percentages over blocks with different area
widths.

J.Pietschmann


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


Addition: Bug with keep-together?

Posted by Abhijit Junnare <ma...@yahoo.com>.
This is how I am formatting the table used to
implement Keep Together

<fo:table width="100%"
space-before="{$ActualSpaceBefore}"
table-layout="fixed" >
  <fo:table-column/>
  <fo:table-body>
    <fo:table-row keep-together="always">
      <fo:table-cell>
	 <fo:block color="{$FontColorBase}"
line-height="{$LineHeightBase}" >

	<xsl:apply-templates/>
	</fo:block>
      </fo:table-cell>
    </fo:table-row>
  </fo:table-body>
</fo:table>


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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