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

Free Support Forum - aspose.com

Protected Blanks

a few questions:

- how can i set protected spaces (in MS-Word: Ctrl+Shift+Space) to prevent text from being wrapped.

- how can i measure a textline to set its spacings to prevent wrong textflow (sorry for my bad english)

following example for undestanding:

i write 2 lines of text w/o dbl-qoutes to a textbox (aligmnent =justify!):

"Zweifel daran, ob die Staats-"

"anwaltschaft unpolitisch"

i want to write exactly this lines as is, but ms-word wraps the 2nd lines word to the 1st lines end, so i get following result:

"Zweifel daran, ob die Staats-anwaltschaft"


how can i prevent this w/o using builder.WriteLn()?


Thanks for your inquiry.

1. This is non breaking space. You can use the following code to insert it:


2. You can’t determine width of text line. You can try insert line break between text lines. See the following code:

builder.Write("Zweifel daran, ob die Staats-\vanwaltschaft unpolitisch");

Hope this helps.

Best regards.