Writing Multiline Text into a TextFormField in Word with Spire.Doc -
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:
i don't know why there 3 blank rows above actual text.


Comments
Post a Comment