设置最大块高度和修剪内容
我在 XSL-FO 文档中有一个表格,在单元格中有一个文章描述,它很容易溢出页面,所以我希望在单元格达到一定高度后将其剪切。这可能吗?这是我的例子,我尝试设置:
height="4cm"
但
block-dimension-progression.maximum="4cm"
它不起作用。
<fo:table-row keep-together.within-page="always" height="2cm">
<fo:table-cell border-right="1.5pt solid black">
<fo:block text-align="center">
<xsl:value-of select="count"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-right="1.5pt solid black" padding-left="2pt">
<fo:block>
<xsl:value-of select="name"/>
</fo:block>
<fo:block font-size="10pt"><xsl:value-of select="manufacturer"/> / <xsl:value-of select="identifier"/></fo:block>
<fo:block font-size="10pt"><xsl:value-of select="description"/></fo:block>
</fo:table-cell>
<fo:table-cell border-right="1.5pt solid black" padding-right="2pt">
<fo:block text-align="right">
<xsl:value-of select="unitprice"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="right">
<xsl:value-of select="totalprice"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
I have a table in an XSL-FO document and in a cell there's an article description, which can easily overflow a page, so I want it to be just cut after reaching a certain height with the cell. Is that possible? This is my example, I tried setting:
height="4cm"
and
block-dimension-progression.maximum="4cm"
but it doesn't work.
<fo:table-row keep-together.within-page="always" height="2cm">
<fo:table-cell border-right="1.5pt solid black">
<fo:block text-align="center">
<xsl:value-of select="count"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-right="1.5pt solid black" padding-left="2pt">
<fo:block>
<xsl:value-of select="name"/>
</fo:block>
<fo:block font-size="10pt"><xsl:value-of select="manufacturer"/> / <xsl:value-of select="identifier"/></fo:block>
<fo:block font-size="10pt"><xsl:value-of select="description"/></fo:block>
</fo:table-cell>
<fo:table-cell border-right="1.5pt solid black" padding-right="2pt">
<fo:block text-align="right">
<xsl:value-of select="unitprice"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="right">
<xsl:value-of select="totalprice"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将带有文章描述的块放入块容器中,并设置
overflow="hidden"
和所需的高度。像这样:Put the block with the article description in a block-container with
overflow="hidden"
and the desired height set. Like this: