Zebra ZPL - How to determine/interpret or find Bartender "font typeface" that's related to ZPL code
Any help would be appreciated!
I need to replicate the " exact font typeface - size and width" in a new Bartender label(laboratory plate label) that is now currently being generated - by ZPL code/syntax
However I cannot find/translate what the ZPL code would relate to in the Bartender font TYPEFACE by looking at the ZPL code.
I'm doing web searches but still cannot find a direct match(s) of ZPL code to aviable Bartender Font Typeface
My best guess is it related to "utf-8" and ^A0N is some type of scalable font.
ZPL code Example:
import socket
host = "xxx.xxx.xxx.17"
port = 9100
from datetime import date
today = date.today()
today_date = today.strftime("%m/%d/%Y")
def create_zpl_command(barcode_list,date_list,text_list):
num_barcodes=len(barcode_list)
Barcode_xpos=[ 100 for i in range(0,num_barcodes)]
Barcode_ypos=[ 80*(i+1)-20 for i in range(0,num_barcodes)]
Date_xpos=[ 600 for i in range(0,num_barcodes)]
Date_ypos=[ 80*(i+1) for i in range(0,num_barcodes)]
Text_xpos=[ 600 for i in range(0,num_barcodes)]
Text_ypos=[ 80*(i+1)-30 for i in range(0,num_barcodes)]
zpl_command="^XA"
el="\r\n"
for i in range(0,num_barcodes):
zpl_command = zpl_command + el + "^FT" + str(Date_xpos[i]) + "," + str(Date_ypos[i]) + "^A0N,21,16^FH\^FD" + date_list[i] + "^FS"
zpl_command = zpl_command + el + "^FT" + str(Text_xpos[i]) + "," + str(Text_ypos[i]) + "^A0N,21,16^FH\^FD" + text_list[i] + "^FS"
zpl_command = zpl_command + el + "^BY3,3,35^FT" + str(Barcode_xpos[i]) + "," + str(Barcode_ypos[i]) + "^BCN,,Y,N^FD>:" + barcode_list[i] + "^FS"
zpl_command =zpl_command + el + "^PQ1,0,1,Y^XZ"
return zpl_command
def print_zpl_command(zpl_command):
mysocket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
try:
mysocket.connect((host, port)) #connecting to host
mysocket.send(bytes(zpl_command, "utf-8"))
mysocket.close () #closing connection
print('sucessfull')
except:
print("Error with the connection")
-
The ^A0N command is the font (looks to be Zebra Triumvirate) with the 21,16 being the height and width.
On a 300dpi printer the 21 is font size 5 but the width for that is 28 by default and the you will need to scale down the width. 66% looks to be 8 from a test I did
0 -
Peter
* Major Thanks * - and also for doing the additional testing above and beyond what I was ask for.
- I will use what you suggested and see if the print quality improves on the plate labels print outs.
- The ZPL coded printouts were much cleaner/clearer compared to what I was using in some plate label templates designed I had tried.
Cheers
Don0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare