FOP warning:line 1 of a paragraph overflows the available area by more than 50 points
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.
Solution 1:
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