今天调了一天的打印位置.就把这个也写上吧
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
Font prFont2 = new Font("宋体", 12, GraphicsUnit.Point);
Font prFont1 = new Font("宋体", 12, FontStyle.Bold, GraphicsUnit.Point);
Font prFont3 = new Font("宋体", 10, GraphicsUnit.Point);
//acceptid
e.Graphics.DrawString(txt_xm.Text, prFont2, Brushes.Black, 142, 40);//用户名称
e.Graphics.DrawString(txt_zz.Text, prFont2, Brushes.Black, 300, 40);//地址
}
调用:
this.printDocument1.Print();