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 Karl Roberts <Ka...@macquarie.com> on 2006/05/05 09:07:07 UTC

Re: conditional page break

Hi,
Carrying on from this thread: 
http://www.nabble.com/forum/ViewTopic.jtp?topic=725743&tview=dump#a19023
05

Where the answer to stopping a block spanning a page break but actually
go onto the next page if there's not enough room to render the whole
block, instead of spanning the page break, was:-

<!-- conditional page break blag -->
<fo:block-container height="4cm">
<fo:block>
	<fo:leader leader-length="0pt"/>
</fo:block>
</fo:block-container>
<fo:block space-before="-4cm"/>
<!-- end conditional page break blag -->

<!-- Real stuff goes here -->
...

(Cool trick by the way and works in the latest trunk of FOP.)

But it does depend on setting the height to what you guess is going to
be the max rendered height of a block
Is there a keep-together type of thing that would force a block not to
straddle a page break?

Cheers

Karl


NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank.


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


Re: conditional page break

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Are you looking for keep-together.within-page="always" or do I
misunderstand what you're after?

On 05.05.2006 09:07:07 Karl Roberts wrote:
> Hi,
> Carrying on from this thread: 
> http://www.nabble.com/forum/ViewTopic.jtp?topic=725743&tview=dump#a19023
> 05
> 
> Where the answer to stopping a block spanning a page break but actually
> go onto the next page if there's not enough room to render the whole
> block, instead of spanning the page break, was:-
> 
> <!-- conditional page break blag -->
> <fo:block-container height="4cm">
> <fo:block>
> 	<fo:leader leader-length="0pt"/>
> </fo:block>
> </fo:block-container>
> <fo:block space-before="-4cm"/>
> <!-- end conditional page break blag -->
> 
> <!-- Real stuff goes here -->
> ...
> 
> (Cool trick by the way and works in the latest trunk of FOP.)
> 
> But it does depend on setting the height to what you guess is going to
> be the max rendered height of a block
> Is there a keep-together type of thing that would force a block not to
> straddle a page break?


Jeremias Maerki


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