File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes how to underline text ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to underline text ?" Watch "how to underline text ?" New topic
Author

how to underline text ?

Engin Okucu
Ranch Hand

Joined: Feb 09, 2002
Posts: 174
I have a word and i want to underline it. I know i can use <fo:inline text-decoration="underline"> but i want to underline for example only the first and second letter and inserts a space between.
Example : 'engin' --> i want to insert space after 'en' in order to underline 'en ' and to write 'gin' but without underlining it.
Thanks.
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Try using the xsl function substring() and fo:inline together.
Something like..
<fo:inline underline>get first two chars using substring</fo:inline><fo:inline nounderline>& #160; get rest of the string</fo:inline>


Spritle Software Blogs
Engin Okucu
Ranch Hand

Joined: Feb 09, 2002
Posts: 174
Thanks it works fine.
I have another question.
I have a word example : 'engin'.
i use substring() to get the first and second character --> 'en'.
I insert a space after 'en' --> 'en '.
I want to underline the space also.
I tried it but it doesn't work ???I may underline only 'en' and not the space . Why ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to underline text ?