此ZPL代码中不应包括哪些内容? [英] Which should not be included in this ZPL Code?

查看:111
本文介绍了此ZPL代码中不应包括哪些内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发Windows Mobile应用程序,该应用程序需要在Zebra打印机中进行打印.问题是,由于客户未提供打印机,因此我在我的国家/地区没有打印机.

I am developing a Windows Mobile App that requires printing into a Zebra printer. Problem is, I do not have the printer with me here in my country since the client did not provide any.

我的方法是先在ZebraDesigner2中设计标签,然后将标签打印到文本文件中.将标签打印到文本文件而不是打印机,会发出ZPL代码以产生我尝试打印的标签.因此,通过先设计标签然后查看ZPL代码,我可以更快地生成ZPL代码. Kinda喜欢使用带有背景XML的拖放式GUI.

My approach was to design a label first in ZebraDesigner2, then print out the label into a text file. Printing the label to a text file instead of a printer sends out the ZPL Code to produce the label I was trying to print. Hence, I can generate ZPL codes faster by designing a label first then seeing the ZPL code. Kinda like having a drag and drop GUI with a background XML.

说我有一个包含以下文本的简单标签: Hello World! 如果我在ZebraDesigner2中进行打印,它将被写入以下文本文件:

Say that I have this simple label that contains this text: Hello World! If I print this in ZebraDesigner2 it would be written to my text file as:

CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR5,5~SD15^JUS^LRN^CI0^XZ
^XA
^MMT
^PW609
^LL0406
^LS0
^FT1,29^A0N,28,28^FH\^FDHello World!^FS
^PQ1,0,1,Y^XZ

我的主要问题是,如果我打算通过Windows Mobile C#应用程序将此代码发送到打印机,我应该在C#代码中包括哪一个?在^ XZ之前,我是否将零件包含^ XA?我相信如果我没记错的话,CT ~~ CD,〜CC ^〜CT〜不应包含在我的代码中.

My main question is, which one do I include in my C# Code if im going to send this code to the printer via my Windows Mobile C# app? Do I include the part with ^XA until ^XZ? I believe that CT~~CD,~CC^~CT~ should not be included in my code If im not mistaken.

推荐答案

在删除任何代码之前,您必须先阅读程序员指南.例如,CT〜命令更改控制前缀.

you have to look at the programmers guide before you remove anything of the code. The CT~ command for example changes the control prefix.

在Internet或zebra.com网站上搜索"ZPL编程指南".

Search the internet or zebra.com site for "ZPL Programming guide".

因此,请保持文本文件不变,然后将其包含在Windows Mobile应用程序中.

So, leave the text file as is and then include that into your windows mobile application.

PS:zebra为标签/收据打印机提供SDK:

PS: zebra offers SDKs for label/receipt printers: http://www.zebra.com/gb/en/products-services/software/adapt-software.html

PS2:如果没有测试打印机,最终结果可能会很糟糕.

PS2: without a test printer you may get bad final results.

这篇关于此ZPL代码中不应包括哪些内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆