Page 1 of 1

Text trim seems to kill spaces

PostPosted: Wed Dec 29, 2010 11:02 pm
by pandaadb

I have a problem with white spaces in my white spaces.
I am constructing Paragraphs with different text elements using the Object Factory. However, it seems, that text elements kill the white spaces before and after my sentence. For example:

"My Name is " + "Pandaa" is using two different text elements, because "Pandaa" has to be in a different font and being of italic style, this sentence translates to:
"My Name isPandaa" in which case the styles for "Pandaa" are applyed, but the whitespaces are gone.
Is there a way to enforce whitespaces?

Kind regards,

Re: Text trim seems to kill spaces

PostPosted: Thu Dec 30, 2010 8:17 am
by jason
Sure. You need:
Code: Select all
<w:t xml:space="preserve">

In ... / set that using:
public void setSpace(String value)