• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Too large text in fo:cell

 
Monty Guppy
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fo:table, in case of too large text in fo:cell, text is written
on multiple lines.
----------------
|text |large |
| |text |
----------------
But, if there is no space in text, text is not broken and
overflow the column.
----------------
|text |large_te|xt
----------------
Is there a method to hide part of text that overflows? Or is there a method to break/wrap the text to the next line?
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Prateek Gupta:

Is there a method to hide part of text that overflows? Or is there a method to break/wrap the text to the next line?

Thats the common problem(as far as i know)
The standard provides the property overflow="hidden" to clip,but it doesn't work in apache FOP.
Two options check
1.Check how to use <fo:block language="en" hyphenate="true" .... it will add an hyphen at the end of the table cell and continue on next line.
2.write a "Template to write texts for a given number of lines and characters" for exmaples max 4 lines with 35 characters per lines.
Its possible, i did it, give a try, if not post back, i will post the code here.
 
Monty Guppy
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using hyphenate (along with language="en") worked well.
Thanks Balaji
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic