I am using a print preview Dialog, so i want to make a new Line so as to make the job understandable when i am printing. I have a Challenge as i get it from the Textbox. Everything seems to be Jammed, Hence i wanted to know how i can go about it.
Code looks like this
Edits
Now My code looks like this now :
Image newImage = Image.FromFile("logo.png");
int width = 80;
int height = 50;
int ix = 100;
int iy = 100;
e.Graphics.DrawImage(newImage, ix, iy, width, height);
var fnt = new Font("Times new Roman", 14, FontStyle.Bold);
int x = 100, y = 100;
int dy = 20;
var header = new Font("Calibri", 21, FontStyle.Bold);
int hx = 100, hy = 100;
int hdy = 20;
e.Graphics.DrawString("Visitor GatePass™", header, Brushes.Black, new PointF(hx, hy)); hy += hdy;
e.Graphics.DrawString("Unique Number : " + uniqueNum.Text, fnt, Brushes.Black, new PointF(x, y)); y += dy;
e.Graphics.DrawString("Full Name : " + fullname.Text, fnt, Brushes.Black, new PointF(x, y)); y += dy;
e.Graphics.DrawString("Method of Identification : " + id_method.Text, fnt, Brushes.Black, new PointF(x, y)); y += dy;
e.Graphics.DrawString("Ward Name : " + ward_name.Text, fnt, Brushes.Black, new PointF(x, y)); y += dy;
e.Graphics.DrawString("Ward Class : " + ward_class.Text, fnt, Brushes.Black, new PointF(x, y)); y += dy;
e.Graphics.DrawString("Ward House : " + ward_house.Text, fnt, Brushes.Black, new PointF(x, y)); y += dy;
e.Graphics.DrawString("House Master : " + house_master.Text, fnt, Brushes.Black, new PointF(x, y)); y += dy;
e.Graphics.DrawString("Accompanying People : " + no_accPeople.Text, fnt, Brushes.Black, new PointF(x, y)); y += dy;
Whilst some parts are Jammed , Like with the Logo and some other formatting.