我正在通过XSL-FO生成一个PDF文档.我有这样一个简单的xhtml结构:
<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>
....
我使用xhtml来编写样式表,将这个xhtml转换成xsl-fo表。这在大多数情况下都是可行的,在这里我也得到了一个页面的内容,但这至少应该是两个页面。在生成时,我会收到以下警告:
30.08.2011 09:57:36 org.apache.fop.apps.FopFactoryConfigurator配置信息:默认页面-高度设置为:11 pr 30.08.2011 09:57:36 org.apache.fop.apps.FopFactoryConfigurator配置信息:默认页面宽度设置为:8.26 pr 30.08.2011 :57:36 org.apache.fop.fo.flow.TableColumn bind back :table-layout=“固定”,列宽未指定的=>返回到pr-列宽度(1) 30.08org.apache.fop.layoutmgr.inline.ContentLayoutManager .2011:.2011 09:57:37 org.apache.fop.layoutmgr.PageBreaker$1 page :标题没有内容30.08.2011 09:57:37 org.apache.fop.layoutmgr.PageBreaker$1 notifyOverflow page: Content of the region-body在bl ock-notifyOverflow维度中溢出可用区域。(fo:页面序列,没有上下文信息)
我得到的结果是一页内容,其中一个元素溢出页面底部。但是其余的内容都丢失了,而不是生成第二个页面。
发布于 2011-09-02 19:54:24
FO文档中表单元格中块上的keep-with-next.within-column
属性存在问题。如果将“始终”值替换为“自动”,则FOP1.0将输出四页。
这可能是FOP中的一个bug。我还用XEP处理了FO文档,它生成了四个页面,没有抱怨。
也许您真正想要的是表行上的keep-together
?
我还注意到<fo:page-sequence>
上有一个空的<fo:page-sequence>
属性。
发布于 2011-09-01 12:33:11
这并不能真正回答您的问题,但是您可以使用开放源码速度数据出版者,它具有跨页的自动表。它不是XSL格式化程序,而是类似的。目前只有德语(这将在2012年春季发生变化),但我知道这对你来说不是问题。
https://stackoverflow.com/questions/7240319
复制相似问题