Hi
I have now tried alla i can think of so this must be a bug.
I hav e a document with multiple form-fields.
One is a multiline box that i want to fill.
Sending in a text with newline is not shown as seperate lines in box, just one long line.
I have tired alla kind of newline i can think of , stringbuilder addline, enviroment.newline, \r \n \r\n \n\r ,vbcrlf
Im using 1.50.4740-beta5
And code:
Code:
PdfTextField _f = (PdfTextField)(form.Fields["olle"]);
_f.MultiLine = true;
_f.Value = new PdfString("firstline\nnextline");
and
Code:
PdfSharp.Pdf.AcroForms.PdfAcroField fieldLocation = form.Fields["olle"];
PdfSharp.Pdf.AcroForms.PdfTextField txtFieldLocation;
if ((txtFieldLocation = fieldLocation as PdfSharp.Pdf.AcroForms.PdfTextField) != null)
{
var sb = new System.Text.StringBuilder();
sb.AppendLine("Text from new line1");
sb.AppendLine("Text from new line2");
txtFieldLocation.MultiLine = true;
txtFieldLocation.Value = new PdfString(sb.ToString(), PdfStringEncoding.Unicode);
}