We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

\n characters in setText()

I have an instance of Run node and want to replace it’s text by using setText():
Run run = …
String str = …


This works fine, unless text contains \n characters. How can I replace text of Run node and make \n characters work the same way they work for plain text?


Thanks for your request. I think, you can try replacing \n character in the string with com.aspose.words.ControlChar.LINE_BREAK.
Best regards,