Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

I try with run.Append(**new Break()**); but this simulates to pressing (Shift+Enter) keys, and if I want a justified text the latest line autofits with lot of spaces between word and word...

And another problem I have is the default font and size in this "Breaks"/"New Lines". I try to "Appen" paragraph propierties in this run (wich contains the break)... but seems that is not allowed.

like image 334
Displaying Avatar asked Apr 29 '11 12:04

Displaying


1 Answers

Try using CarriageReturn instead.

run.Append(new CarrigeReturn());

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

like image 97
Samuel Neff Avatar answered Sep 28 '22 04:09

Samuel Neff