怎样调用打印机打印多张图
因为每次调用打印机时,每打印一张条码图片,都要点一次确定,并且一张条码会打印一张纸,这样很麻烦。所以我用了个很笨的方法,先把这几张图片竖列拼凑成一张图放到pictureBox1,然后用下面 dy()打印,但这样当条码图片多的时候,又会很麻烦, 一次一次点击确定,请问还有什么更好的方法吗?各位
private void dy()//执行打印
{
PrintDialog MyPrintDg = new PrintDialog();
MyPrintDg.Document = printDocument1;
if (MyPrintDg.ShowDialog() == DialogResult.OK) { try
{
printDocument1.Print();
}
catch
{ //停止打印
printDocument1.PrintController.OnEndPrint(printDocument1, new System.Drawing.Printing.PrintEventArgs());
}
}
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(pictureBox1.Image, 20, 20);
}