条码打印

来源:互联网 发布:网络销售茶叶聊天技巧 编辑:程序博客网 时间:2024/05/20 00:50

1、用Code128字体打印,需要在系统中注册该字体:

 private void button1_Click(object sender, System.EventArgs e)
  
{
   p.Print(); 
  }

 
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
  
{
  System.Drawing.Font FT
=new Font("Code39",20); //Code39是你下载并安装的条码字体名称
  e.Graphics.DrawString("*TEST",FT,System.Drawing.Brushes.Black,0,0);
  }

 

2、直接绘图打印

3、使用控件详见http://www.idautomation.com/formscontrols/download.html

4、调用打印机API或使用打印机控制语言如 ZPL 直接发命令。

原创粉丝点击