T
Tony Johansson
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(object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
....
....
float leftMargin = e.MarginBounds.Left;
float topMargin = e.MarginBounds.Top;
float yPos = 0;
Font printFont = new Font("Arial", 12);
yPos = topMargin + printFont.GetHeight(e.Graphics);
e.HasMorePages = false;
e.Graphics.DrawString(data.ToString(), 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(object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
....
....
float leftMargin = e.MarginBounds.Left;
float topMargin = e.MarginBounds.Top;
float yPos = 0;
Font printFont = new Font("Arial", 12);
yPos = topMargin + printFont.GetHeight(e.Graphics);
e.HasMorePages = false;
e.Graphics.DrawString(data.ToString(), printFont, Brushes.Black,
leftMargin, yPos, new StringFormat());
}