Here is a sample code:
Document pdfDocument = new Document(fileName);
PdfForms.Field formField = pdfDocument.Form[fieldName] as PdfForms.Field;
PdfForms.TextBoxField textBoxField = formField as PdfForms.TextBoxField;
textBoxField.Value = value;
Value is of type string and contains a carriage return (\r\n).
The problem is that the result doesn’t show the carriage return.
I have also tried to replace \r\n by just \r, not better.
Please let me know how I should handle this.