更改 Apache FOP 中的表结尾缩进
我正在使用 Apache FOP 1.0 生成 PDF。我想扩展表的结尾缩进,这样我就不会收到 INFO 警告:
信息:fo:table 比 inline-progression-dimension 中的可用空间更宽。根据过度约束的几何规则调整末端缩进(XSL 1.1,第 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" 会导致单元格内的文本溢出到相邻单元格中,就像列宽发生变化一样。我为此使用了正确的属性吗?
I am using Apache FOP 1.0 to generate PDF. I want to extend the end-indent of the table such that I do not get the INFO warnings:
INFO: An fo:table is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4).
Here is a table with overflowing table width:
<?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>
The page width is 6.5inches and the table is 6.649in wide, clearly exceeding the dimension. I have 1in padding on both sides so I want to extend the right a little.
Using the table attribute end-indent="-0.5in" causes the text within cells to overflow into neighboring cells as if the column width changed. Am I using the correct attribute for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将
end-indent="0in"
添加到fo:table-body
。Add
end-indent="0in"
tofo:table-body
.