sing System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
gethua();
}
}
protected void gethua()
{
Random random = new Random();
Bitmap bt = new Bitmap(351, 402, PixelFormat.Format24bppRgb);
Graphics g = Graphics.FromImage(bt);
Font fn1 = new Font("Tahoma", 10, FontStyle.Bold);
Font fn = new Font("Tahoma", 9, FontStyle.Bold);
g.Clear(Color.Honeydew);
g.DrawString("中国电子学会电子设计初级工程师认证考试名", fn1, Brushes.Black, new PointF(20, 20));
g.DrawString("准 考 证", fn1, Brushes.Black, new PointF(140, 50));
g.DrawString("准考证号", fn, Brushes.Black, new PointF(14, 85));
g.DrawString("CIE09101080004", fn, Brushes.Black, new PointF(90, 85));
g.DrawString("考生姓名", fn, Brushes.Black, new PointF(14, 115));
g.DrawString("李晓杰", fn, Brushes.Black, new PointF(90, 115));
g.DrawString("考生性别", fn, Brushes.Black, new PointF(14, 145));
g.DrawString("男", fn, Brushes.Black, new PointF(90, 145));
g.DrawString("身份证号", fn, Brushes.Black, new PointF(14, 175));
g.DrawString("410381198408272032", fn, Brushes.Black, new PointF(90, 175));
g.DrawString("考试时间", fn, Brushes.Black, new PointF(14, 205));
g.DrawString("2007年11月30号", fn, Brushes.Black, new PointF(90, 205));
&nbs
C#生成图片证件
最新推荐文章于 2024-05-29 18:35:32 发布