Hello!
If I use the DrawString below with object of StringFormat as the last object
it works good.
If I instead remove object StringFormat below as the last object of
DrawString I get some rows that are not printed correctly.
It's look like when toner is too low for the printer.This is only for some
rows.
Can somebody explain why this happens?
What kind of StringFormat is used when this parameter is missing?
private void printPage(objec t sender,
System.Drawing. Printing.PrintP ageEventArgs e)
{
....
....
float leftMargin = e.MarginBounds. Left;
float topMargin = e.MarginBounds. Top;
float yPos = 0;
Font printFont = new Font("Arial", 12);
yPos = topMargin + printFont.GetHe ight(e.Graphics );
e.HasMorePages = false;
e.Graphics.Draw String(data.ToS tring(), printFont, Brushes.Black,
leftMargin, yPos, new StringFormat()) ;
}
If I use the DrawString below with object of StringFormat as the last object
it works good.
If I instead remove object StringFormat below as the last object of
DrawString I get some rows that are not printed correctly.
It's look like when toner is too low for the printer.This is only for some
rows.
Can somebody explain why this happens?
What kind of StringFormat is used when this parameter is missing?
private void printPage(objec t sender,
System.Drawing. Printing.PrintP ageEventArgs e)
{
....
....
float leftMargin = e.MarginBounds. Left;
float topMargin = e.MarginBounds. Top;
float yPos = 0;
Font printFont = new Font("Arial", 12);
yPos = topMargin + printFont.GetHe ight(e.Graphics );
e.HasMorePages = false;
e.Graphics.Draw String(data.ToS tring(), printFont, Brushes.Black,
leftMargin, yPos, new StringFormat()) ;
}
Comment