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

Free Support Forum - aspose.com

How to add spaces between Text

Hello.

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.

Sunil

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:

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.documentbuildermembers.html

Please refer to Write and Writeln methods.

Regards,

Hi.

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

Sunil

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.

Regards,

Hello.

I am just using

builder.writeln("hello world");

Sunil

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,