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

Free Support Forum - aspose.com

How to add spaces between Text


Please suggest , how to add spaces between text.

Account ID : XYZ

When i am trying to give spaces, Aspose.Words trims all spaces in document.


Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your inquiry.

Please clarify how you are trying to add spaces. The easiest way to add text is utilizing DocumentBuilder class:


Please refer to Write and Writeln methods.



I am just using space bar to fix required spaces in between text like abc def , here three spaces between abc and def.


Hello Sunil!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I know that spaces are added with space bar. But I cannot guess where you are adding them so they disappear. Please clarify. It would be good to see any code snippet or a bit more detailed explanation.



I am just using

builder.writeln("hello world");


This should work without any problems. Please provide us the complete code sample how you create the document including instructions saving it.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you,