I have a label that contains comments and I am using iTextsharp to insert those lines into a pdf now the point where comments come in here is the box for comments int he pdf:
I will use this code to put in a line:
string comment = lblComment.text;
// lets say the lblComment.text = "This is a Document where User Added new Address"
cb.BeginText();
cb.SetColorFill(BaseColor.DARK_GRAY);
cb.SetFontAndSize(bf, 11);
cb.ShowTextAligned(PdfContentByte.ALIGN_CENTER, Comment, 215, 96, 0); // Insert the Cooments
cb.EndText();
Now the problem is Comment can be long and I want some way of doing this so if the Line for the Comment is more than these many charechters insert next line and take half of the comment strign to the next line. I tried looking at splitting string on google all i could find:
string data = "THExxQUICKxxBROWNxxFOX";
return data.Split(new string[] { "xx" }, StringSplitOptions.None);
This is where the string has xx you split it but didnt work.