W3C home > Mailing lists > Public > www-xsl-fo@w3.org > October 2009

Re: conditional page break

From: Tony Graham <Tony.Graham@MenteithConsulting.com>
Date: Thu, 22 Oct 2009 14:45:15 +0100
To: www-xsl-fo@w3.org
Message-ID: <87d44fy238.fsf@takai.menteithconsulting.com>
On Tue, Oct 20 2009 15:55:49 +0100, tamsin@anorakgirl.co.uk wrote:
> I am trying to find a way to conditionally start a new page within a PDF.
> Basically, if block A fits on one page, even with space remaining, block B
> should start on a new page. But if block A runs onto the next page, block B
> should start straight after block A.

If you are using an XSL 1.1 processor and A is the only thing on its
page, then you could use a flow map and put A and B in separate flows.

You could direct A to its page and the second page, and direct B to the
second page.  If A overflows its page, its flow would continue on the
second page.

The fo:layout-master-set would have to have just a
fo:single-page-master-reference for the first page.

Regards,


Tony Graham                         Tony.Graham@MenteithConsulting.com
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd                               XML Guild member
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2
Received on Thursday, 22 October 2009 13:45:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 October 2009 13:45:53 GMT