ZPL
来源:互联网 发布:民国公元纪年法的算法 编辑:程序博客网 时间:2024/06/01 09:45
Purpose
This sample code demonstrates how to open up a raw socket connection to a network ZPL printer and send a label down for printing. It was written in C# using Visual Studio 2008 Professional and tested successfully on a Windows XP Machine Service Pack 3.
Sample Code
// Printer IP Address and communication port
string ipAddress ="10.3.14.42";
int port = 9100;
// ZPL Command(s)
string ZPLString =
"^XA" +
"^FO50,50" +
"^A0N50,50" +
"^FDHello, World!^FS" +
"^XZ";
try
{
// Open connection
System.Net.Sockets.TcpClient client =new System.Net.Sockets.TcpClient();
client.Connect(ipAddress, port);
// Write ZPL String to connection
System.IO.StreamWriter writer =
new System.IO.StreamWriter(client.GetStream());
writer.Write(ZPLString);
writer.Flush();
// Close Connection
writer.Close();
client.Close();
}
catch (Exception ex)
{
// Catch Exception
}
//打印二维码
QR Code https://km.zebra.com/kb/index?page=content&id=SA315&actp=LIST
0 0
- ZPL
- ZPL
- ZPL换行
- ZPL指令
- ZPL II 命令参考
- ZPL并口打印
- ZPL II 命令参考
- ZPL II 命令参考
- zpl之初级使用
- ZPL条码打印类
- ZPL二维码打令
- ZPL中的^BX
- ZPL打印中文
- ZPL实例说明
- ZPL常见问题解析网站
- ZPL II 简易指令集
- C#条码打印与ZPL
- ZPL指令中文参考地址
- 剑指offer面试题29
- avd 加速
- C语言函数的可变参数列表
- ISTQB FL初级认证考题分布与学习目标
- 剑指offer面试题30
- ZPL
- 另类手游研发数据 游戏是否受欢迎看会话时长
- Swift学习之十一:数组与字典(Array and Dictionary are collection types)
- 剑指offer面试题31
- 【足迹C++primer】24、顺序容器概述
- 关于JavaScript跨域问题 及 实时刷新
- Swift编程语言入门实战系列教程(五)---增加键盘输入函数
- 剑指offer面试题32
- sqlite操作