-1

sorry for disturbance. I want to print a word "c_sunil_folder1_folder2_folder3_folder4_folder5_folder6_suniltext.pdf" in a table cell using XSL FO but the length of word is so long and also can contains more than hundred characters in a word so it is not wrapping in a single column

Could any one suggest a solution if it is possible to wrap with in a column

<fo:table-cell xsl:use-attribute-sets="table.cell" border-top="none" keep-together.within-line="always">
<fo:block keep-together.within-line="always">
<fo:inline><xsl:value-of select="'c_sunil_folder1_folder2_folder3_folder4_folder5_folder6_suniltext.pdf'"/>
</fo:inline>
</fo:block>
.
.
.

Output: In the output we can see that text is overlapping in next column of table:

Text is overlapping in next column text

sunil
  • 50
  • 8
  • Welcome to Stack Overflow. Please take the [tour] to learn how Stack Overflow works and read [ask] on how to improve the quality of your question. Then [edit] your question to include your source code as a working [mcve], which can be tested by others. – Progman Oct 01 '22 at 11:31

1 Answers1

1

The first thing to do is remove the keep-together.within-line="always" that is keeping everything to one line.

The watermark on your screenshot suggests that you could be using Antenna House Formatter. If so, you can use axf:word-break="break-all" (see https://www.antenna.co.jp/AHF/help/en/ahf-ext.html#axf.word-break) to allow Antenna House Formatter to break anywhere within a word.

Otherwise, the usual technique is to use XSLT to insert a ZERO-WIDTH SPACE between every character in a table cell. See How to force wrap on table entries

Tony Graham
  • 7,306
  • 13
  • 20
  • thank you so much Tony for your kind attention and suggestion for this question, I used the 'Zero width space' code for this question and it is working. I would appreciate more if you will provide an active link of " https://www.antennahouse.com/product/ahf64/ahf-ext.html#axf.word-break" – sunil Oct 02 '22 at 14:43
  • Sorry, I had copied that from an older answer. The correct link is: https://www.antenna.co.jp/AHF/help/en/ahf-ext.html#axf.word-break – Tony Graham Oct 02 '22 at 16:29