我正在使用 Apache FOP 1.0 生成 PDF。我想扩展表格的结尾缩进,这样我就不会收到 INFO 警告:
信息:一个 fo:table 比 inline-progression-dimension 中的可用空间更宽。根据过度约束的几何规则(XSL 1.1,ch. 5.3.4)调整缩进。
这是一个表格宽度溢出的表格:
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master
master-name="CommonMasterLayout"
page-height="11in" page-width="8.5in"
margin-top=".5in" margin-bottom=".5in"
margin-left="1in" margin-right="1in">
<fo:region-body region-name="middle" margin-bottom=".75in" margin-top=".75in"/>
<fo:region-before region-name="top" extent=".75in"/>
<fo:region-after region-name="bottom" extent=".5in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="CommonMasterLayout">
<fo:flow flow-name="middle">
<fo:block>
<fo:table end-indent="-0.5in" width="100%" table-layout="fixed">
<fo:table-column column-width="2.033in"/>
<fo:table-column column-width="4.616in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="0.5pt solid black">
<fo:block>Some text that will flow over to the neighboring cell</fo:block>
</fo:table-cell>
<fo:table-cell border="0.5pt solid black">
<fo:block>Other text within a box</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
页面宽度为 6.5 英寸,桌子宽度为 6.649 英寸,明显超出尺寸。我的两边都有 1 英寸的填充物,所以我想向右延伸一点。
使用表格属性end-indent="-0.5in"会导致单元格内的文本溢出到相邻的单元格中,就好像列宽发生了变化一样。我为此使用了正确的属性吗?