日期:2014-05-17 浏览次数:20788 次
e.Graphics.RotateTransform(90.0F);
string sTitle = "xxxx";
int width = e.PageBounds.Width;
int height = e.PageBounds.Height;
date = DateTime.Parse(date).ToString("yyyy-MM-dd");
//date=string.Format("yyyy-MM-dd", date);
date = "日期:" + date;
e.Graphics.DrawString(sTitle, titleFont, brush, iLeftMargin + 140, iTopMargin); //标题
e.Graphics.DrawString("", fntTxt, brush, iLeftMargin + 300, iTopMargin += 15);
e.Graphics.DrawString(date, fntTxt, brush, iLeftMargin + 300, iTopMargin += 15); //日期
e.Graphics.DrawString("打印时间:" + DateTime.Now.ToString(), fntTxt, brush, iLeftMargin, iTopMargin);
e.Graphics.DrawString("", fntTxt, brush, iLeftMargin + 300, iTopMargin += 15);
//......
e.Graphics.TranslateTransform(100, 100);
e.Graphics.RotateTransform(90.0F);
e.Graphics.DrawString("Cylan ", this.Font, Brushes.Black, 0, 0);