我有一个可以打印文本的 Qz Tray 实例,但是对于如何从字符串生成 pdf417 条形码我有些迷茫。
非常感谢任何指导。
如果您想避免使用光栅图形,某些语言(例如 ZPL)支持 PDF417。以下是直接来自 Zebra 网站的示例:
常用于汽车应用的 PDF417 ZPL 示例
^XA ^FO50,50^BY3,3^B7N,8,5,7,21,N^FH_^FD[)>_1E06_1DP12345678_1DQ160_1D1JUN123456789A2B4C6D8E _1D20LA6-987_1D21L54321 ZES_1D15KG1155_1DBSC151208_1D7Q10GT_1E_04^FS ^XZ
使用 ^B7 的带有 PDF417 的基本示例 ZPL 格式
^XA^BY2,3 ^FO50,50^B7N,5,5,,83,N ^FDZebra Technologies strives to be the expert supplier of innovative solutions to specialty demand labeling and ticketing problems of business and government. We will attract and retain the best people who will understand our customer's needs and provide them with systems, hardware, software, consumables and service offering the best value, high quality, and reliable performance, all delivered in a timely manner.^FS ^XZ
将此适应 QZ 托盘非常简单......
var config = qz.configs.create("ZDesigner");
var data = [
"^XA^BY2,3\n",
"^FO50,50^B7N,5,5,,83,N\n",
"^FDZebra Technologies strives to be the expert supplier of innovative solutions to specialty demand labeling and ticketing problems of business and government. We will attract and retain the best people who will understand our customer's needs and provide them with systems, hardware, software, consumables and service offering the best value, high quality, and reliable performance, all delivered in a timely manner.^FS\n",
"^XZ"
];
qz.print(config, data);
最后,我将 PDF417 生成为图像,然后使用 QzTray 提供的原始图像打印进行打印。