Writing Multiline Text into a TextFormField in Word with Spire.Doc -


i have ms word template my ms word template

i want put string field

string strdata = "line 1\r\nline2\r\nline3"; 

i use spire.doc it:

foreach (section section in document.sections) {     foreach (formfield field in section.body.formfields)     {         switch (field.type)         {             case fieldtype.fieldformtextinput:                 if (datasource.containskey(field.name))                     field.text = datasource[field.name];                 break;                 // add more types here         }     } } 

and here output:

output

i don't know why there 3 blank rows above actual text.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -