30

How do you add a page break into a document with XSL-FO? I'm using Apache FOP to create PDFs, if that makes a difference.

Philip Morton
  • 129,733
  • 38
  • 88
  • 97

4 Answers4

41

You can also do:

<fo:block page-break-before="always">
  ...things you want in a new page...
</fo:block>
Jack
  • 16,506
  • 19
  • 100
  • 167
cxm8002
  • 411
  • 4
  • 2
22

The FOP compliance page says that it supports page-break-after, page-break-before, and page-break-inside in the later versions, plus partial support for keep-together, keep-with-next, keep-with-previous.

Vy Do
  • 46,709
  • 59
  • 215
  • 313
Matthew Wilson
  • 3,861
  • 21
  • 14
18

Thanks, the following worked for adding a page break after a table:

<fo:table break-after="page">
Philip Morton
  • 129,733
  • 38
  • 88
  • 97
1

This worked for me. But this is Elite Design Gallery syntax.

<w:p ><w:r><w:br w:type="page"/></w:r></w:p>
Suzan Balaa
  • 122
  • 1
  • 11