jZebra - 原始命令入门

发布于 2025-01-05 17:55:08 字数 532 浏览 0 评论 0原文

我的任务是将带有条形码的网页转换为一键式标签打印。我已经启动并运行了 jZebra,但我不知道从哪里开始了解如何为打印机编写命令。

我已经用谷歌搜索了我能想到的与此相关的所有内容。

基本上,我试图理解这段代码:

applet.append("^XA^CF,0,0,0^PR12^MD30^PW800^PON^CI13\n");
// Draws a line. applet.append("^FO0,147^GB800,4,4^FS\n");
applet.append("^FO0,401^GB800,4,4^FS\n");
applet.append("^FO0,736^GB800,4,4^FS\n");
applet.append("^FO35,92^AdN,0,0^FWN^FH^FD^FS\n");
applet.append("^FO615,156^AdN,0,0^FWN^FH^FD(123) 456-7890^FS\n");

是否有人有关于这些字符/命令(如“^FO0,401^GB800,4,4^FS”)含义或用途的链接或信息?

I've been given the task of converting a web page with a barcode to a one click label print. I've got jZebra up and running, but I have no idea where to get started as far as understanding how to write commands for a printer.

I've Google'd just about everything I can think of regarding this.

Basically, I am trying to understand this code:

applet.append("^XA^CF,0,0,0^PR12^MD30^PW800^PON^CI13\n");
// Draws a line. applet.append("^FO0,147^GB800,4,4^FS\n");
applet.append("^FO0,401^GB800,4,4^FS\n");
applet.append("^FO0,736^GB800,4,4^FS\n");
applet.append("^FO35,92^AdN,0,0^FWN^FH^FD^FS\n");
applet.append("^FO615,156^AdN,0,0^FWN^FH^FD(123) 456-7890^FS\n");

Does anyone have links to or information regarding what these characters / commands like "^FO0,401^GB800,4,4^FS" mean or do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦里梦着梦中梦 2025-01-12 17:55:08

对于斑马来说,这个简单的指南将为您提供帮助。
Zebra 命令

N
q609
Q203,26
B26,26,0,UA0,2,2,152,B,"777777"
A253,56,0,3,1,1,N,"JHON3:16"
A253,26,0,3,1,1,N,"JESUSLOVESYOU"
A253,86,0,3,1,1,N,"TEST TEST TEST"
A253,116,0,3,1,1,N,"ANOTHER TEST"
A253,146,0,3,1,1,N,"SOME LETTERS"
P1,1

关于JZebra 上的

     var applet = document.jzebra;
     if (applet != null) {
applet.append("N\n");
applet.append("q609\n");
applet.append("Q203,26\n");
 applet.append("B26,26,0,UA0,2,2,152,B,\"777777\"\n");
applet.append("A253,56,0,3,1,1,N,\"JHON3:16\"\n");
applet.append("A253,26,0,3,1,1,N,\"JESUSLOVESYOU\"\n");
applet.append("A253,86,0,3,1,1,N,\"TEST TEST TEST\"\n");
applet.append("A253,116,0,3,1,1,N,\"ANOTHER TEST\"\n");
applet.append("A253,146,0,3,1,1,N,\"SOME LETTERS\"\n");
applet.append("P1,1\n");}

明确这一点:

EPL 是每行一个命令。命令以命令标识符(通常是字母)开头,后跟特定于该命令的以逗号分隔的参数列表。您可以在 EPL2 编程文档中查找每个命令。以下是上例中命令的英语版本。

  1. 发送一个初始换行符可以保证任何先前的中断
    命令已提交。
  2. [N] 清除图像缓冲区。这是重要的一步并且
    通常应该是任何 EPL 文档中的第一个命令;
    谁知道上一个作业使打印机处于什么状态。
  3. [q] 将标签宽度设置为 609 点(3 英寸标签 x 203 dpi
    = 609 点宽)。
  4. [Q] 将标签高度设置为 203 点(1 英寸标签),宽度为 26
    标签之间的点间隙。 (打印机可能会自动
    有道理,但这并没有什么坏处。)
  5. [B] 绘制一个值为“777777”的 UPC-A 条形码
    x = 26 点(1/8 英寸),y = 26 点(1/8 英寸),带窄条
    宽度为 2 点,高度为 152 点(3/4 英寸)。 (这
    标签坐标系的原点是左上角
  6. [A] 在以下位置绘制文字“JESUSLOVESYOU”
    x = 253 点(3/4 英寸),y = 26 点(1/8 英寸)
    打印机字体“3”,正常水平和垂直缩放,
    并且没有花哨的黑底白字效果。

所有起始线都是相似的。
10. [P] 打印一张标签的一份副本。

For zebra you this simple guide will help you.
On this Zebra commands

N
q609
Q203,26
B26,26,0,UA0,2,2,152,B,"777777"
A253,56,0,3,1,1,N,"JHON3:16"
A253,26,0,3,1,1,N,"JESUSLOVESYOU"
A253,86,0,3,1,1,N,"TEST TEST TEST"
A253,116,0,3,1,1,N,"ANOTHER TEST"
A253,146,0,3,1,1,N,"SOME LETTERS"
P1,1

on JZebra

     var applet = document.jzebra;
     if (applet != null) {
applet.append("N\n");
applet.append("q609\n");
applet.append("Q203,26\n");
 applet.append("B26,26,0,UA0,2,2,152,B,\"777777\"\n");
applet.append("A253,56,0,3,1,1,N,\"JHON3:16\"\n");
applet.append("A253,26,0,3,1,1,N,\"JESUSLOVESYOU\"\n");
applet.append("A253,86,0,3,1,1,N,\"TEST TEST TEST\"\n");
applet.append("A253,116,0,3,1,1,N,\"ANOTHER TEST\"\n");
applet.append("A253,146,0,3,1,1,N,\"SOME LETTERS\"\n");
applet.append("P1,1\n");}

Having clear this:

EPL is one command per line. A command starts out with a command identifier, typically a letter, followed by a comma-separated list of parameters specific to that command. You can look up each of these commands in the EPL2 programming documentation. Here’s an English-language version of the commands in the above example.

  1. Sending an initial newline guarantees that any previous borked
    command is submitted.
  2. [N] Clear the image buffer. This is an important step and
    generally should be the first command in any EPL document;
    who knows what state the previous job left the printer in.
  3. [q] Set the label width to 609 dots (3 inch label x 203 dpi
    = 609 dots wide).
  4. [Q] Set the label height to 203 dots (1 inch label) with a 26
    dot gap between the labels. (The printer will probably auto-
    sense, but this doesn't hurt.)
  5. [B] Draw a UPC-A barcode with value "777777" at
    x = 26 dots (1/8 in), y = 26 dots (1/8 in) with a narrow bar
    width of 2 dots and make it 152 dots (3/4 in) high. (The
    origin of the label coordinate system is the top left corner
    of the label.)
  6. [A] Draw the text "JESUSLOVESYOU" at
    x = 253 dots (3/4 in), y = 26 dots (1/8 in) in
    printer font "3", normal horizontal and vertical scaling,
    and no fancy white-on-black effect.

All tha A starting lines are similar.
10. [P] Print one copy of one label.

朕就是辣么酷 2025-01-12 17:55:08

在 google 工作 9,000 小时后:

许多证卡打印机(例如 Zebra 或 Eltron 制造的打印机)
需要发送给他们特殊的 RAW 打印机命令才能执行
某些功能(例如磁条编码或条形码
印刷)。这些 RAW 命令通常以文本形式发送
专有语法。此 RAW 语法由打印机制造商指定(通常以开发人员手册的形式)。句法
打印机制造商和打印机之间会有很大差异
模型。

重点是我的。可能想用谷歌搜索开发人员手册。

来源:http://code.google.com/p/jzebra/wiki/OldSummaryDoNotUse

After 9,000 hours in google:

Many card printers (such as Zebra or Eltron manufactured printers)
need special RAW printer commands sent to them in order to perform
certain functions (such as magnetic strip encoding or barcode
printing). These RAW commands are usually sent as text in a
proprietary syntax. This RAW syntax is specified by the printer manufacturer (usually in the form of a developer's manual). Syntax
will vary drastically between printer manufacturers and printer
models.

Emphasis is mine. Probably want to google for a developer's manual.

Source: http://code.google.com/p/jzebra/wiki/OldSummaryDoNotUse

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文