【问题标题】:Is there any way to make full page table?有没有办法制作整页表?
【发布时间】:2020-08-10 18:32:14
【问题描述】:

我想让这张桌子也有 100% 的高度。

XSLT 片段:

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

  <!-- defines the layout master -->
      <fo:layout-master-set>
        <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>

  <!-- starts actual layout -->
  <fo:page-sequence master-reference="simpleA4">

    <fo:flow flow-name="xsl-region-body">
 
      <fo:table width="110mm" border-style="outset" border-width="1pt">
        <fo:table-column column-number="1" column-width="80%" border-style="solid" border-width="1pt"/>
        <fo:table-column column-number="2" column-width="80%" border-style="solid" border-width="1pt"/>
        <fo:table-body>
            <xsl:apply-templates select="etiqueta"/>
        </fo:table-body>
      </fo:table>

    </fo:flow>
  </fo:page-sequence>
</fo:root>

【问题讨论】:

    标签: xslt xslt-1.0 xslt-2.0 xsl-fo


    【解决方案1】:

    您实际上是自己回答的。使用:

    <fo:table height="100%">
    

    要使最后一行扩展以填充高度以使表格填满页面,您可能需要在最后一行的 fo:table-cell 上这样做:

    <fo:table-cell block-progression-dimension.optimum="100%">
    

    您没有说明您使用的是哪种格式化程序,所以这可能适合您,也可能不适合您。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      • 2013-10-18
      • 1970-01-01
      • 2015-11-21
      • 1970-01-01
      相关资源
      最近更新 更多