Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 21st, 2005, 12:54 AM
Guru
Guest
 
Posts: n/a
Default Wrap table column content

Hi,

I am using FOP for creating pdf.
I am having a table which has 14 columns.
And each column contents may contain any
number of chars.

My problem is :
When the text is having no spaces in between like
"thisisalongwordandcouldnotbewrapped", it is overlapping
another column. How to wrap the text with in the cell.??

I used wrap-option="wrap" overflow="auto", but no luck.
Is there any solutions for this?

Guru.
  #2  
Old July 21st, 2005, 12:54 AM
Guru
Guest
 
Posts: n/a
Default Re: Wrap table column content

Finally i solved the problem
by inserting zero width white spaces at regular intervals.
Thanks to FOP mailing list..!


<xsl:call-template name="text_wrapper"> <xsl:with-param
name="Text" select="$myString"/>
</xsl:call-template>


===Templates used to do the task.
<xsl:template name="text_wrapper">
<xsl:param name="Text"/>
<xsl:choose>
<xsl:when test="string-length($Text)">
<xsl:value-of select="substring($Text,1,25)"/>

<xsl:call-template name="wrapper_helper">
<xsl:with-param name="Text" select="substring($Text,26)"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template name="wrapper_helper">
<xsl:param name="Text"/>
<xsl:value-of select="substring($Text,1,25)"/>

<xsl:call-template name="text_wrapper">
<xsl:with-param name="Text" select="substring($Text,26)"/>
</xsl:call-template>
</xsl:template>


rampaadh@yahoo.com (Guru) wrote in message news:<ab9532c9.0409300001.66ecb5d4@posting.google. com>...[color=blue]
> Hi,
>
> I am using FOP for creating pdf.
> I am having a table which has 14 columns.
> And each column contents may contain any
> number of chars.
>
> My problem is :
> When the text is having no spaces in between like
> "thisisalongwordandcouldnotbewrapped", it is overlapping
> another column. How to wrap the text with in the cell.??
>
> I used wrap-option="wrap" overflow="auto", but no luck.
> Is there any solutions for this?
>
> Guru.[/color]
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles