3
除了page-1之外,我的桌子都没有填充,就像我告诉它的那样。我有一个"first"
和"Rest"
定义为XSL FO - 尊重填充
<!-- layout for the first page -->
<fo:simple-page-master master-name="first"
page-height="11in"
page-width="8.5in"
margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-body margin-top="3cm"/>
<fo:region-before extent="2cm"/>
<fo:region-after extent=".1cm"/>
</fo:simple-page-master>
<!-- layout for the other pages -->
<fo:simple-page-master master-name="rest"
page-height="11in"
page-width="8.5in"
margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-body margin-top="3cm"/>
<fo:region-before extent="2cm"/>
<fo:region-after extent=".1cm"/>
</fo:simple-page-master>
但是,我不认为这会如何影响我的填充。
<fo:block>
<!-- table start -->
<fo:table table-layout="fixed" width="100%" border-collapse="separate" padding-after="1em">
<fo:table-column column-width="15mm"/>
<fo:table-column column-width="46mm"/>
<fo:table-column column-width="28mm"/>
<fo:table-column column-width="22mm"/>
<fo:table-column column-width="19mm"/>
<fo:table-column column-width="30mm"/>
<fo:table-header>
<fo:table-cell>
<fo:block font-weight="bold" border-width="0.5mm" border-style="solid" >
<fo:inline padding-left="1mm">Model</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block font-weight="bold" border-width="0.5mm" border-style="solid" border-left="none">
<fo:inline padding-left="2mm">Description</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block font-weight="bold" border-width="0.5mm" border-style="solid" padding-left=".1mm" border-left="none">
<fo:inline padding-left="2mm">Material</fo:inline>
</fo:block>
</fo:table-cell>
请注意padding-left
属性。为什么除了第一页以外都没有得到尊重?
UPDATE
我注意到这只发生在“溢出页面”上。当我的表有足够的数据包装到另一个页面。如果它是一张新桌子,问题就会消失。
你知道这是否在最近的版本中解决? – csvan 2017-01-14 13:00:55
@csvan - 对不起,我不知道。我不再在这个项目上工作。 – 2017-01-14 14:22:57
谢谢,我确实设法通过在表格单元节点上设置填充来解决它。 – csvan 2017-01-14 14:29:29