I C# code prints very slow as compared to a third party barcode printing
software. That software prints approximately 10 labels in 2 seconds while my
C# code prints 10 labels in 5 to 6 seconds. And this differences increases
with the increase number of labels.
The code is as follwods:
Here rdr = OleDbDataReader
Font is Times New Roman, 12pt
private void printDocument1_ PrintPage(objec t sender,
System.Drawing. Printing.PrintP ageEventArgs e)
{
e.HasMorePages = false;
if(this.rdr.Rea d())
{
e.Graphics.Draw String(rdr[0].ToString(), font, Brushes.Black, 10, 20);
e.Graphics.Draw String(rdr[1].ToString(), font, Brushes.Black, 10, 40);
e.Graphics.Draw String(rdr[2].ToString(), font, Brushes.Black, 10, 60);
if( --this.labels_to_ print > 0)
e.HasMorePages = true;
}
}
How can I increase printing speed? Please help.
Arif.
software. That software prints approximately 10 labels in 2 seconds while my
C# code prints 10 labels in 5 to 6 seconds. And this differences increases
with the increase number of labels.
The code is as follwods:
Here rdr = OleDbDataReader
Font is Times New Roman, 12pt
private void printDocument1_ PrintPage(objec t sender,
System.Drawing. Printing.PrintP ageEventArgs e)
{
e.HasMorePages = false;
if(this.rdr.Rea d())
{
e.Graphics.Draw String(rdr[0].ToString(), font, Brushes.Black, 10, 20);
e.Graphics.Draw String(rdr[1].ToString(), font, Brushes.Black, 10, 40);
e.Graphics.Draw String(rdr[2].ToString(), font, Brushes.Black, 10, 60);
if( --this.labels_to_ print > 0)
e.HasMorePages = true;
}
}
How can I increase printing speed? Please help.
Arif.
Comment