You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by sujata shetty <su...@yahoo.com> on 2002/10/09 06:20:56 UTC

How to break the long word within the cell

Hi,
   I have a table in PDF and each column is defined as
2cm.
I am facing a problem in displaying the values in
table.
It the text length is too long then instead of
breaking the text it is printing in a straight line
crossing the column, which results into overlapping of
text of another column. 
I have set the property of wrap-option. This applies
for a word. If a single word is too long that time it
will not break the text but print it in a straight
line.

My requirement is,if the column values exceeds more
than the column width the text should break, even if
it is a single word and display in multiple lines
within the same column.

Can anybody help me on this?

Thanks and Regards,
Sujata

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

RE: How to break the long word within the cell

Posted by sujata shetty <su...@yahoo.com>.
Roland,
  Thanks for the reply. 
I did it by setting hyphenate="true"
It started working.

Thanks once again.


-Regards
Sujata

 --- Roland Neilands <rn...@pulsemining.com.au>
wrote: > Sujata,
> >    I have a table in PDF and each column is
> defined as
> > 2cm.
> > I am facing a problem in displaying the values in
> > table.
> > It the text length is too long then instead of
> > breaking the text it is printing in a straight
> line
> > crossing the column, which results into
> overlapping of
> > text of another column.
> > I have set the property of wrap-option. This
> applies
> > for a word. If a single word is too long that time
> it
> > will not break the text but print it in a straight
> > line.
> >
> > My requirement is,if the column values exceeds
> more
> > than the column width the text should break, even
> if
> > it is a single word and display in multiple lines
> > within the same column.
> 
> This is what hyphenation is for, check
> docs/examples/fo/hyphen.fo.
> 
> If this isn't approriate, eg for part numbers,
> insert zero width spaces in
> the text:
>
http://www.biglist.com/cgi-bin/wilma/wilma_glimpse/xsl-list?query=zero+width
> +space
> 
> Cheers,
> Roland.
> 
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

RE: How to break the long word within the cell

Posted by Roland Neilands <rn...@pulsemining.com.au>.
Sujata,
>    I have a table in PDF and each column is defined as
> 2cm.
> I am facing a problem in displaying the values in
> table.
> It the text length is too long then instead of
> breaking the text it is printing in a straight line
> crossing the column, which results into overlapping of
> text of another column.
> I have set the property of wrap-option. This applies
> for a word. If a single word is too long that time it
> will not break the text but print it in a straight
> line.
>
> My requirement is,if the column values exceeds more
> than the column width the text should break, even if
> it is a single word and display in multiple lines
> within the same column.

This is what hyphenation is for, check docs/examples/fo/hyphen.fo.

If this isn't approriate, eg for part numbers, insert zero width spaces in
the text:
http://www.biglist.com/cgi-bin/wilma/wilma_glimpse/xsl-list?query=zero+width
+space

Cheers,
Roland.