FOP 警告:段落第 1 行溢出可用区域超过 50 点

发布于 2024-12-07 08:34:48 字数 489 浏览 2 评论 0原文

只是为了确保我想与您分享我对 FOP vre 1.0 的理解, FOP 使用自动换行算法,即当数据溢出表格单元格的宽度时,FOP 会查找数据中的空白,如果找到空白,则将从最近的空白溢出的数据包装到下一行。那个细胞。

但是如果数据没有空格怎么办,那么 FOP 就无法换行数据。 这就是我面临的问题。

我写这段代码。

<fo:table-cell border="solid">
<fo:block hyphenate="true" language="en" wrap-option="wrap">
<xsl:value-of select="welcomeMsg"></xsl:value-of>
</fo:block>
</fo:table-cell>

但它从表格单元格溢出,而不是换行,因为welcomeMsg是一个长字符串,中间没有空格。我需要将welcomeMsg换行到表格单元格内。

Just to make sure I would like to share my understanding of FOP vre 1.0 with you,
FOP uses a automated line breaking algorithm i.e when data overflows the width of a table cell,FOP looks for white space in the data and if it finds a white space,then it wraps the data that overflows from the nearest white space into next line of that cell.

But what if the data don't has a white space,then then FOP is not able to wrap data.
This is the problem I'm facing.

I write this code.

<fo:table-cell border="solid">
<fo:block hyphenate="true" language="en" wrap-option="wrap">
<xsl:value-of select="welcomeMsg"></xsl:value-of>
</fo:block>
</fo:table-cell>

but it overflows from table cell,instead of wraping because the welcomeMsg is a long string with no white spaces in between.I need the welcomeMsg to be wrapped inside table cell.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如果没有你 2024-12-14 08:34:48

Apache FOP 实现了 Unicode UAX #14 换行算法。因此,如果一个单词(或很长的数字)无法被破坏并因此溢出表格单元格,那是因为该算法。通常的解决方法是将零宽度空格 () 插入到您知道可能导致溢出的字段中。这可以通过 XSLT 轻松完成。另请参阅:如何强制表格条目换行

Apache FOP implements the Unicode UAX #14 algorithm for line breaking. So, if a word (or loooong number) cannot be broken and therefore overflows a table-cell, it's because of that algorithm. The usual work-around is to insert zero-width spaces () into fields that you know could cause overflows. This can easily be done via XSLT. See also: How to force wrap on table entries

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文