This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Too large text in fo:cell Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Too large text in fo:cell" Watch "Too large text in fo:cell" New topic
Author

Too large text in fo:cell

Monty Guppy
Ranch Hand

Joined: Sep 15, 2001
Posts: 49
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

Joined: Jul 13, 2001
Posts: 3150
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.


Spritle Software Blogs
Monty Guppy
Ranch Hand

Joined: Sep 15, 2001
Posts: 49
using hyphenate (along with language="en") worked well.
Thanks Balaji
 
Consider Paul's rocket mass heater.
 
subject: Too large text in fo:cell
 
Similar Threads
Switch
Please help me solve this problem
JTextArea help
IE float problem
using font created by createFont