ZPL 命令解析:生成带有条形码和中文文本的标签
^XA^FO10,25^BQN,3,7,N,Y,Y,D^FD03,[0]^CWJ,E:SIMSUN.FNT^FS^FO230,36^AJN,40,40^CI28^FD[1]^FS^FO230,76^AJN,38,38^CI28^FD规格:[2][-]^FS^FO230,116^AJN,38,38^CI28^FD备注:[4]^FS^FO230,190^AJN,38,38^CI28^FD[5]^FS^XZ This is a ZPL command that generates a barcode label with some text. Here is a breakdown of the command: ^XA: This is the start of the ZPL command. ^FO10,25: This sets the position of the field origin (top left corner) to coordinates (10, 25) on the label. ^BQN,3,7,N,Y,Y,D: This command specifies a QR Code barcode with a size of 3 (module width) and 7 (module height). The N parameter specifies that the barcode should be printed in normal orientation. The Y parameters specify that the barcode should be human-readable and the D parameter specifies that the barcode should be printed in direct thermal mode. ^FD03,[0]: This command specifies the data to be encoded in the barcode. In this case, it is "03,[0]". ^CWJ,E:SIMSUN.FNT^FS: This command sets the font to SIMSUN.FNT and the font size to 40. The font size is specified as "40,40". ^FO230,36^AJN,40,40^CI28^FD[1]^FS: This command sets the position of the field origin to coordinates (230, 36) and prints the text "[1]". The ^AJN command specifies that the text should be printed using the SIMSUN.FNT font at a size of 40. The ^CI28 command specifies that the text should be printed in Chinese (encoding 28). ^FO230,76^AJN,38,38^CI28^FD规格:[2][-]^FS: This command sets the position of the field origin to coordinates (230, 76) and prints the text "规格:[2][-]". The ^AJN command specifies that the text should be printed using the SIMSUN.FNT font at a size of 38. ^FO230,116^AJN,38,38^CI28^FD备注:[4]^FS: This command sets the position of the field origin to coordinates (230, 116) and prints the text "备注:[4]". The ^AJN command specifies that the text should be printed using the SIMSUN.FNT font at a size of 38. ^FO230,190^AJN,38,38^CI28^FD[5]^FS: This command sets the position of the field origin to coordinates (230, 190) and prints the text "[5]". The ^AJN command specifies that the text should be printed using the SIMSUN.FNT font at a size of 38. ^XZ: This is the end of the ZPL command. Overall, this command generates a label with a QR Code barcode and some text in Chinese. The text includes a label number, specifications, a note, and another number.
原文地址: https://www.cveoy.top/t/topic/p54P 著作权归作者所有。请勿转载和采集!