Only one page is generated with XSL-FO Page-Break Problem?
I am generating a PDF Document through XSL-FO. I have a simple xhtml structure like this:
<body>
<h2><center>Status</center></h2>
<table border="0">
<colgroup span="5"></colgroup>
<tr>
<td><h4>Aktion</h4></td>
<td><h4>Kommentar</h4></td>
<td><h4></h4></td>
<td><h4>Zeitpunkt</h4></td>
<td><h4>Benutzer</h4></td>
</tr>
<tr>
<td><h5>Mappe archiviert</h5></td>
<td><h5>QMSAA</h5></td>
<td><h5></h5></td>
<td><h5>26.07.2011 13:14</h5></td>
<td><h5>Mustermann, Peter</h5></td>
</tr>
<tr>
<td><h5>Mappe als pdf gedruckt.</h5></td>
<td><h5></h5></td>
<td><h5></h5></td>
<td><h5>26.07.2011 13:14</h5></td>
<td><h5>Mustermann, Peter</h5></td>
</tr>
....
And i am using a xhtml to fop Stylesheet to convert this xhtml to an xsl-fo table. This works for most cases and in this case here i also get one page of content, but this should be at least two pages. While generating i get the following warnings:
30.08.2011 09:57:36 org.apache.fop.apps.FopFactoryConfigurator configure INFO: Default page-height set to: 11in 30.08.2011 09:57:36 org.apache.fop.apps.FopFactoryConfigurator configure INFO: Default page-width set to: 8.26in 30.08.2011 09:57:36 org.apache.fop.fo.flow.TableColumn bind WARNUNG: table-layout="fixed" and column-width unspecified => falling back to pr oportional-column-width(1) 30.08.2011 09:57:37 org.apache.fop.layoutmgr.inline.ContentLayoutManager WARNUNG: Title has no content 30.08.2011 09:57:37 org.apache.fop.layoutmgr.PageBreaker$1 notifyOverflow WARNU开发者_Python百科NG: Content of the region-body on page 1 overflows the available area in bl ock-progression dimension. (fo:page-sequence, no context info available)
The result i get is one page of content with one element overflowing the bottom of the page. But the rest of the content is lost, not second page is generated.
- What could be the problem here?
- Is it possible to have a pagebreak between two fo:table-row elements of one table?
- Why is no second page generated?
There is a problem with the keep-with-next.within-column
property on blocks within table cells in your FO document. If the "always" values are replaced with "auto", FOP 1.0 outputs four pages.
This could be a bug in FOP. I also processed the FO document with XEP, and it produced four pages without complaining.
Maybe what you really want is keep-together
on table rows?
I also noticed an empty font-family
attribute on <fo:page-sequence>
.
Not really an answer to your question, but you could use the open source speedata Publisher which has automatic table breaking across pages. It is not an XSL-FO formatter but similar. Currently in German only (this will change in spring 2012) but I know that this is not a problem for you.
精彩评论