Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Planned SDK features
  • Page:
  • 1

TOPIC:

Adding \r to the doc genrates + at the end of line 6 years 11 months ago #12411

  • Bouzidi
  • Bouzidi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 0
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.
Attachments:

Please Log in or Create an account to join the conversation.

Adding \r to the doc genrates + at the end of line 6 years 10 months ago #12419

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
Can you please provide pdfs to test (one before the modification and one after)?

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum