Adding \r to the doc genrates + at the end of line - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Planned SDK features
  • Page:
  • 1

TOPIC: Adding \r to the doc genrates + at the end of line

Adding \r to the doc genrates + at the end of line 1 year 5 months ago #12411

  • Bouzidi
  • Bouzidi's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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 1 year 5 months ago #12419

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
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