如何使用Zebra ZPL指令打印帶斜杠的零?
可以使用ZPL中的^CI指令(重映射指令)來(lái)打印帶斜杠的零。
^CI指令的格式是:^CIa,s1,d1,...
【 a = 被要求的字符集,取值如下:
0 = Single Byte Encoding - U.S.A. 1 Character Set
1 = Single Byte Encoding - U.S.A. 2 Character Set
2 = Single Byte Encoding - U.K. Character Set
3 = Single Byte Encoding - Holland Character Set
4 = Single Byte Encoding - Denmark/Norway Character Set
5 = Single Byte Encoding - Sweden/Finland Character Set
6 = Single Byte Encoding - Germany Character Set
7 = Single Byte Encoding - France 1 Character Set
8 = Single Byte Encoding - France 2 Character Set
9 = Single Byte Encoding - Italy Character Set
10 = Single Byte Encoding - Spain Character Set
11 = Single Byte Encoding - Miscellaneous Character Set
12 = Single Byte Encoding - Japan (ASCII with Yen symbol) Character Set
13 = Zebra Code Page 850 (see page 342)
14 = Double Byte Asian Encodings
15 = Shift-JIS
16 = EUC-JP and EUC-CN
17 = Deprecated - UCS-2 Big Endian
18 to 23 = Reserved
24 = Single Byte Asian Encodings
25 = Reserved
26 = Multibyte Asian Encodings with ASCII Transparency
27 = Zebra Code Page 1252 (see page 344)
】
【s1 = 字符輸出圖像,0-255】
【d1 = 字符輸入,0-255】
當(dāng)使用Zebra的內(nèi)部字體時(shí),可以使用的^CI指令直接映射打印“不帶斜杠的零”或“帶斜杠的零”(如果字體的字符集中有帶斜杠的零)。例如,在^AA字體中, 使用^ CI0將打印一個(gè)帶斜杠的零,而使用^ CI1將打印一個(gè)不帶斜杠的零。(^CI指令中,0 = Single Byte Encoding-U.S.A.1 Character Set;1 = Single Byte Encoding-U.S.A.2 Character Set;其中U.S.A.1 Character Set內(nèi)的零帶斜杠,U.S.A.2 Character Set內(nèi)的零不帶斜杠。)
下面使用^ A0字符集作為例子。默認(rèn)通過(guò)調(diào)用DEC48位置上的零是沒(méi)有斜杠的,而DEC157位置上的零是有斜杠的。如果想要調(diào)用具有斜杠的零時(shí),可以通過(guò)^ CI指令(^ CIa,157,48)來(lái)重映射打印機(jī)字符。
例子:A0字符集中打印帶斜杠的零。
^XA
^CI0,157,48
^FO20,20^A0,40,40^FD0123456789^FS
^XZ
(在打印字符0時(shí),CI指令會(huì)使用DEC157位置的零代替DEC48位置上的零)
還有一些字符集,零的位置是在DEC26和DEC48上,其中,DEC26上的零不帶斜杠,DEC48上的零帶斜杠。
^XA
^CI0,26,48
^XZ
(在打印字符0時(shí),如果想要不帶斜杠的零,CI指令會(huì)使用DEC26位置的零代替DEC48位置上的零)