Hi Guys, we're printing Labels to a GK420d using ^GF command and think maybe we could improve speeds using compression, read ...

T Tim Lightbourne 2 years 11 months ago
197 1 0

For example, I saved the ZPL data that our application outputs to a file just to see what was being sent and it looks like this
 
^XA
^GFA,119900,119900,100,0000000.... lots more data.....
^XZ
 
The file is actually 235kb in size. Just out of interest I did a search and replace of 0 in the file as there appeared to be an awful lot of them
and it made 200,000 matches! So I'm assuming compression could drastically reduce the size of the file maybe?
 
I read in the notes from Programming Guide for ZPL II by Zebra that
 
"A comma in the data pads the current line with 00 (white space), minimizing the data sent"
 
and also it mentions compression types
 
A = ASCII hexadecimal (follows the format for other download commands)
B = binary (data sent after the c parameter is strictly binary)
C = compressed binary (data sent after the c parameter is in compressed binary format. The data is compressed on the host side using Zebra’s compression algorithm. The data is then decompressed and placed directly into the bitmap.) Default: A
 
So I was thinking that maybe this could be useful? But I'm not sure how to implement it.
 
Thanks
Tim

Please register or login to post a reply

1 Replies

V Vedsatx Saddvv

Hi Tim,
There are plenty of ways of compressing the data you send to the printer. Your app is converting all the data into a bitmap in the least compressed method.   Doing anything to compress that already modified image in your ^GF command will be difficult.  You're better off converting the data from the start in a different way.  It's hard to know how to direct you without knowing how your app is creating that ^GF command, but some of your options are:
1. Initially do not convert your label into an image, but create an actual ZPL label.  This takes more work initially, but usually gets you the smallest data stream.  Tools - ZebraDesigner.
2. Convert the image into a base 64 encoded image.  Download it with the ~DY command and print with ^IL to print... i.e.
     ~DYE:LABEL,P,P,1044,,:B46:H4sIC...more data...:a1b2    ^XA^ILE:LABEL.PNG^XZ
     You can use several tools to do this conversion including the Link-OS SDK. 

CONTACT
Can’t find what you’re looking for?