In order to add data to a PDF file in a specific Template, we used this code when creating the doc to add a string that contains `\r\n' :
PdfContentByte Cb = PdfWriter.GetInstance(doc, sourceDocumentStream.AsStream()).DirectContent;
xPos = txt.align == TemplateTextAlign.left ? xPos : doc.PageSize.Width - xPos;
foreach (var line in txt.text.Split(new char[] { '\n' }, StringSplitOptions.None))
{
cb.ShowTextAligned(txt.align == TemplateTextAlign.left ? Element.ALIGN_LEFT : Element.ALIGN_RIGHT, line, xPos, yPos, 0);
yPos -= 15;
}
cb.EndText();
But when reading the doc, we had some '+' added automatically at the end of the lines, you can see it on the pictures.
Would you please helps us to solve this problem.
Thanks.