I\'m trying to print in PDF two columns of information that contain some strings that the user inputs. This is my code so far:
string s = \"\";
int width = 6
The issue is the spacing key you use when printing to PDF.
Simply use non-breaking spaces instead (press Alt
+<255>
) or you can convert your spaces with the below code:
string s = " ";
if(s == " ")
{
s = " "
}
OR
use "My name is this".Replace(" ", " ");
Update 2
Since you are using iText# you can you the API to insert spaces by doing for example:
iTextSharp.text.Paragraph s = new iTextSharp.text.Paragraph(name, font);
s.SpacingAfter = 20;
s.Add("AAA: ");
Please let me know if my answer support your question.