FOP warning: line 1 of the paragraph overflows the available area by more than 50 points

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

But what if the data does not have a space, then the FOP will not be able to wrap the data. This is the problem I am facing.

I am writing 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 the table cell, not wraping, because welcomeMsg is a long line with no spaces between them. I need welcomeMsg to be wrapped inside a table cell.

+4
source share
1 answer

Apache FOP implements the Unicode UAX # 14 algorithm for line breaks. So, if the word (or loooong number) cannot be broken and therefore overflows the cell table, this is because of this algorithm. The usual workaround is to insert zero-width spaces ( &#x200B; ) in fields that, as you know, can cause overflows. This is easy to do through XSLT. See Also: XSL-FO: Forced Table Binding

+2
source

All Articles