0
votes

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 WARNUNG: 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.

The only page 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?
2
Can you show us the XSL-FO document (preferably trimmed down as much as possible)?mzjn
Unfortunately i can't because the system i'm working on is kind of a black box. I just have access to the xsl stylesheet which generates the FO code. I'll try to post that.Chris
If you have the XML source and the XSLT stylesheet, can't you just forget about the "black box" and run a transformation from the command line?mzjn
Finally i got this FO Document out of the process: gist.github.com/1188165Chris

2 Answers

1
votes

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>.

0
votes

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.