xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: tables and keeps with 0.95beta
Date Mon, 05 May 2008 08:22:27 GMT
Actually, no, it's not a bug. ;-) I just forgot that keep-together
doesn't apply to table-cell, so the keep value is only propagated to its
children. But the keep is not in effect between the two blocks of the
table-cell.

This is how it looks in document.fo (reduced to the important stuff):

<fo:table-cell keep-together.within-page="always">
  <fo:block/>
  <fo:block>xx xx.xx x xx.xx <fo:block/>xxxxxxxxxxx xxxxxx xxxxx xxx xxx
xxx xxx xxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxx xxx xxxxxxxx
xxxx xxx xxxxxxxxxx xxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
xxxxxxxxxxx xxx xxxxxxx</fo:block>
</fo:table-cell>

This is the same as if you specified:
<fo:table-cell>
  <fo:block keep-together.within-page="always"/>
  <fo:block keep-together.within-page="always" >xx xx.xx x xx.xx
<fo:block/>xxxxxxxxxxx
xxxxxx xxxxx xxx xxx xxx xxx xxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxx
xxxxxxxxxxx xxx xxxxxxxx xxxx xxx xxxxxxxxxx xxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxx xxx xxxxxxx</fo:block>
</fo:table-cell>

So, the keep-with-previous on the table-row only keeps the first block
of the cell together with the last area produced by the previous
table-row. The FO implementation is free to break between the first and
second block in the cell.

So to keep everything together, put the keep-together on the table-row 
(as I've mentioned in the other post). Or enclose the two blocks in yet
another block. In that case the table-cell's keep-together has an effect
on the enclosing block and effectively keeps the two original blocks
together. Together with the keep-with-previous on the row, everything
work as expected then.

On 05.05.2008 09:49:21 Jeremias Maerki wrote:
> I think this is a bug. I'll look into it. In the meantime, you can work
> around the problem by moving the keep-together on the table-cell to the
> table-row.
> 
> On 05.05.2008 00:14:28 Philipp Wagner wrote:
> > Hi,
> > 
> > I tried FOP 0.95beta together with a table with 
> > keep-together.within-page="always" and keep-with-previous="always" 
> > attributes, which didn't work in 0.94 at all. While the page breaks are 
> > almost correct now, there is a problem with the table headers. I 
> > uploaded a sample document at
> > http://philipp-wagner.com/temp/20080504-fop/document.fo
> > and the PDF output at
> > http://philipp-wagner.com/temp/20080504-fop/document.pdf
> > 
> > If you look on page two you'll see a horizontal line between the first 
> > and the second row, which shouldn't be there.
> > 
> > Apart from that, the keep-with-previous="always" attribute doesn't work, 
> > as you can see on the top of the second page, too. The first row on the 
> > second page has a keep-with-previous attribute, which should keep it 
> > together with the row before, which is not the case here.
> > 
> > Are this known limitations of FOP or just a small bug? Or are there any 
> > workarounds?
> > 
> > Philipp
> 
> 
> 
> Jeremias Maerki
> 



Jeremias Maerki


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


Mime
View raw message