2013-04-09 130 views
0

我正在使用带领导者的表格列(虚线)在不同单元格中的内容之间创建可视连接。 E.g:使用空表格单元格和领导者的XSL-FO

Text in col one..........Text in col two 

我用一个“间隔”栏,以保持在不同的细胞中的文字和间隔器柱之间的空间有虚线的领导者。

我的问题是,根据在第一个栏的实际文本会有COLUMN2前柱1和领导者之后的空白,如

Text in col one..... .....Text in col two 

有时不会有空间,但其他时间空间会有几个像素。

示例代码:

<fo:table table-layout="fixed" width="100%" margin-left="0" 
    margin-right="0" padding-before="0" padding-after="0" 
    border-width="0" font-family="Franklin" font-size="12pt"> 
    <fo:table-column column-width="50mm" /> 
    <fo:table-column column-width="10mm" /> 
    <fo:table-column column-width="50mm" /> 
    <fo:table-body> 

     <fo:table-row> 
      <fo:table-cell display-align="after"> 
       <fo:block text-align-last="justify"> 
        <xsl:text>Text in col1</xsl:text> 
        <fo:leader leader-pattern="dots" />    
       </fo:block> 
      </fo:table-cell>         
      <fo:table-cell display-align="after"> 
       <fo:block text-align-last="justify">          
        <fo:leader leader-pattern="dots" />    
       </fo:block> 
      </fo:table-cell>         
      <fo:table-cell display-align="after"> 
       <fo:block> 
        <xsl:text>Text in col2</xsl:text>              
       </fo:block> 
      </fo:table-cell> 
     </fo:table-row>       
    </fo:table-body> 
</fo:table> 

有谁知道如何摆脱恼人的空间?

回答

1

我得到了这个工作。基本上只是删除了中间一列,并将最后一列设置为与文本前面的领导者完全合理。

<fo:table table-layout="fixed" width="100%" margin-left="0" margin-right="0" padding-before="0" padding-after="0" border-width="0" font-family="Franklin" font-size="12pt"> 
    <fo:table-column column-width="50mm" /> 
    <fo:table-column column-width="50mm" /> 
    <fo:table-body> 
     <fo:table-row> 
      <fo:table-cell display-align="after"> 
       <fo:block text-align-last="justify"> 
        <xsl:text>Text in col1</xsl:text> 
        <fo:leader leader-pattern="dots" /> 
       </fo:block> 
      </fo:table-cell> 
      <fo:table-cell display-align="after"> 
       <fo:block text-align-last="justify"> 
         <fo:leader leader-pattern="dots" /> 
         <xsl:text>Text in col2</xsl:text> 
       </fo:block> 
      </fo:table-cell> 
     </fo:table-row> 
    </fo:table-body> 
</fo:table>