New lines, font and default size (open xml sdk)

I need to insert a new line at the end of the text.

I am trying to use run.Append(**new Break()**); but this imitates a keystroke (Shift + Enter), and if I want the justified text to have the last lines of autofit with a lot of spaces between word and word ...

And another problem that I ran into is the default font and size in this β€œBreaks” / β€œNew Lines”. I am trying to β€œadd” paragraph propositions in this run (which contains a break) ... but it seems like this is not allowed.

+6
source share
1 answer

Try using CarriageReturn instead.

 run.Append(new CarrigeReturn()); 

http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.carriagereturn.aspx

+6
source

Source: https://habr.com/ru/post/886957/


All Articles