Rank: Newbie
Joined: 4/7/2017 Posts: 1 Location: India
|
Hi Team,
I have been facing an issue while generating pdf using Apache FOP in Altova Style Vision, that “Long text flows into adjacent cells/block” in table when there are no spaces between words. I have been generating the XSLT using Altova Style Vision.
Can you please help me if there is any attribute that will resolve this issue.
|
Rank: Advanced Member
Joined: 9/9/2005 Posts: 483 Location: AT
|
Hello,
Wrapping behaviour in table cells (or any other container too narrow for the widest string it contains) is a common problem. To "wrap" a long string which does not contain spaces the solution is to insert a Unicode zero-width space character after every character in your string. Then, it will wrap wherever necessary in the output.
You can do this using an Auto-Calculation by substituting the following XPath expression for the (contents).
string-join( for $x in ( string-to-codepoints( . ) ) return codepoints-to-string( $x ), codepoints-to-string( 8203 ) )
Note that this approach requires the use of XSLT 2.0 paul attached the following image(s):
|