I have an app that prints out labels to a Zebra GK420t label printer. The ZPL sends some text and a QRCode. This works fine when the printer is first turned on, but there is another app that prints to it, and after the other app has printed, the position of the QRCode changes on our labels.
I don't have access to the source for the other program so I can't see what ZPL it is sending. I know it is sending some config to the printer (Print Width for example) but I can't figure out what it could be sending to change the positioning for just the QRCode.
This is the label from our app when the label printer is first turned on
And this is label from our app, after the other app has printed a label and changed some settings.
The QR Code moved up and to the right, but everything else stayed in the same place.
This is some example ZPL for one of our labels
^XA
^PW420
^LS0
^LH0,0
^CF0,40^FO20,25^FDUnknown Vendor^FS
^FO15,0^BQN,2,6^FD##hCsck00000000000779/221a1^FS
^CFR,15^FO55,220^FD3877^FS
^CFR,15^FO180,70^FDTue 07:30 Nov 10^FS
^FO180,100^FDU. Surgeon^FS
^FO180,130^FDTotal hip^FS
^FO180,160^FDsigma^FS
^FO180,190^FDHip tool^FS
^FO180,220^FD1 of 2^FS
^XZ
^BY (Bar Code Field Default) is the only command that can affect all barcodes. However it shouldn't affect field origin, but you may want to test this.
Your best bet is to print a config label before and after and look for the difference. Also, it's good practice to create a 'config' format and send as needed. In your case where you are sharing the printer among different applications you should send the config each time you print.
We have many Zebra printers across our manufacturing site, and we send all of the config data each time we print a label.
If you have an Ethernet enabled printer you should also be able to type the IP address into IE and view the printer config information from your web browser.
Regards,
For some more info on Brians answer, in case anyone comes up against this. The ^BY field does affect QRCodes on the GK420t printer.
The other vendor was setting the barcode defaults
^BY2,2,59
And that was moving the QR Code down by 59. I've tested it on another model which didn't have the same issue so I think it's a bug.
If you are in 600 dpi Subst ^FO15,0 with ^FO15,050
015,050 is the position of qr code inside your label.
Try putting ^LH0,0 right after ^XA. That fixed mine.
Related
Consider the below ZPL code.
^XA
^BY2,2,80
^FO50,50^BCR^FD3079+Plate-SS-14 # 44^FS
^XZ
Using the online viewer at http://labelary.com/viewer.html shows you vertically rotated bar code with label beneath and everything appears to be fine.
However, when I print the label the bar code is not scan-able because the lines of the bar code are too thick (see below images). Removing the rotate flag from ^BCR and making it ^BC fixes the issue and the lines are perfectly normal and scan-able. I have tried numerous different methods to rotate the code with no success and can't wrap my head around as to why the lines become thicker when rotating a bar code.
Does anyone have any insight as to why this happens?
Broken Rotated Barcode Image
Working (not rotated) Barcode Image
In my case, the solution was the printing speed being too fast. Another potential solution would be to turn down the darkness or temperature of the printer itself if it's an option in the settings.
Simply opening my respective zebra printer's printing preferences showed me a Print Speed setting which was set to 12.7 cm/s. Reducing it down to 10.1 cm/s fixed the problem.
Adjust the Darkness of the printing and/or the speed of the printing. that should solve your problem.
I think it is a problem with your use of the PNG file that the site generates. The PNG file generated includes enough whitespace in the front (top) quiet zone of the symbol to scan, but if you use the Windows system viewer to print the barcode and print in full size, it slices off the top-most bars.
Try embedding the PNG file into a document, setting the photo size to less than full page, or use the PDF file.
Please Help! I'm trying to print to a 1.5"x1.0" label on a Zebra ZP 450. The printer is connect to a Mac. When I print the label the printout is way over to the left. Only as small part of the bar code print out on the left side of the label. I'm guessing this is cause by the 'left position' in the printer settings. I tried calibrate (two flash and four flash) with no luck. I tried using zebrasetuputil app also with no luck (don't may not know enough of the programming to write it correctly).
Is there a terminal command I could use to change the default left position setting within the printer?
Sorry I'm new to all of this. Any help would be great!
OSX 10.11.1
Zebra ZP 450
Label Size: 1.5"x1.0"
Send this command to the printer:
^XA^LS0^XZ
^XA Starts the format (always required)
^LSa sets the offset where a = offset
^XZ End format (always required)
See the ZPL Programming Guide
Additionally, there is a command you can set to prevent other labels from setting these offsets. (Sorry, don't know off the top of my head) It's a very good idea because ideally these offset should only be used for printers that are exhibiting wear, and need an offset to account for physical differences.
Using it for label formats will cause all sorts of problems with label formats that don't set it, because the labels that do set it will cause the ones that don't to be offset.
I am developing a Windows Mobile App that requires printing into a Zebra printer. Problem is, I do not have the printer with me here in my country since the client did not provide any.
My approach was to design a label first in ZebraDesigner2, then print out the label into a text file. Printing the label to a text file instead of a printer sends out the ZPL Code to produce the label I was trying to print. Hence, I can generate ZPL codes faster by designing a label first then seeing the ZPL code. Kinda like having a drag and drop GUI with a background XML.
Say that I have this simple label that contains this text:
Hello World!
If I print this in ZebraDesigner2 it would be written to my text file as:
CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR5,5~SD15^JUS^LRN^CI0^XZ
^XA
^MMT
^PW609
^LL0406
^LS0
^FT1,29^A0N,28,28^FH\^FDHello World!^FS
^PQ1,0,1,Y^XZ
My main question is, which one do I include in my C# Code if im going to send this code to the printer via my Windows Mobile C# app? Do I include the part with ^XA until ^XZ? I believe that CT~~CD,~CC^~CT~ should not be included in my code If im not mistaken.
Late answer, but since this is getting viewed...
The CT line and first set of XA..XZ sequence sets up the modes, label length, printable area, etc.
If you remove those, it will take those settings from the label/printer settings, which is usually what you want. The printers can sense the length and width of the label.
Leaving them in can cause big problems, because if you define the printable area in your label, and then the next label type submitted does not, it will use the settings you have defined -- which can cause blank areas in the label, eg. cutoff USPS Label barcodes that are printed after your Zebra Designer custom labels.
Found this out the hard way - leave those out, and you should leave out of the remaining XA..XZ sequence the MMT, PW609, LL0406, and LS0 as well - your Hello World will not be affected.
If you really want to limit the area printed to, set up margins inside the printable area, etc, refer to the manual.
you have to look at the programmers guide before you remove anything of the code. The CT~ command for example changes the control prefix.
Search the internet or zebra.com site for "ZPL Programming guide".
So, leave the text file as is and then include that into your windows mobile application.
PS: zebra offers SDKs for label/receipt printers: http://www.zebra.com/gb/en/products-services/software/adapt-software.html
PS2: without a test printer you may get bad final results.
I need to print an image that is being returned to me through a web service (the data is returned as RAW) and I cannot for the life of me figure out how to print a graphic to a label with EPL.
The EPL manual defines the Graphic Write instruction as:
GWp1, p2, p3, p4, DATA
All of the parameters are returned to me, so I don't have to worry about calculating the height, width, etc., but my problem is that I don't know how to format the DATA.
The manual says DATA should be
Raw binary data without graphic file formatting. Data must be in bytes.
I've tried passing a binary string and a hex string, but nothing seems to work. There is no example on how to use this command in the EPL manual and after hours of searching online I have not been able to find a single example of how to use the command (i.e. example EPL commands that I can copy & paste to send to the printer).
Does anyone have an idea of how to use this command? Could you provide me with an example? (by example I don't mean a framework, code, etc., what I mean is just the plain EPL commands).
I can confirm that the data is in raw, uncompressed binary. It is also inverted-- that is, the 0 bits print as black, at least on my UPS-firmware LP-2844. I have no idea why all the examples from Zebra show the data as encoded into a hex representation.
It's worth noting that most print servers (HP Jetdirect, Lantronix LPS1-T, and almost certainly the Zebra built-in and external print servers) will form a binary connection to the printer if you spit data at them on port 9100 (using netcat for example):
nc printer_hostname_or_ip_address 9100 < test_file.txt
You get no feedback from the printer, except for the label having printed or not.
It takes my LP-2844 (UPS Firmware) printer about 5-6 seconds to print a label containing a 816 wide x 1218 tall downloaded bitmap onto a 4" wide x 6" tall label. It seems to be all imaging time: sending three labels at once is not any faster, and the network connection (through a Lantronix LPS1-T) is held open until the final label prints. That image is at the native resolution of the printer (203 dots/inch), and there is no dithering or resizing going on (I don't think EPL2 even knows how to dither or resize).
It might be possible to speed up the imaging time by optimizing the label into many smaller bitmaps (and horizontal and vertical line segments, and perhaps filled-in rectangular blocks). This wouldn't be a very hard optimization because the image is a single-bit black and white bitmap, and the code would be fairly simple. I don't know if it would really speed it up, though.
A more modern Zebra GX420 running ZPL with a built-in ethernet port ($500 online) can print the same label (with essentially the same graphic download encoding) in 1-2 seconds.
By the way, since I haven't yet actually answered the question, the raw EPL code for this is:
(a blank line)
N
q816
Q1218,20
GW10,10,102,1218,(124236 bytes of inverted bitmap data)
P
all the newlines are 0x0a (unix-style).
Maybe this will help, it has examples (and corrects an error in the manual). Also, it may be easier to use the GM command instead and just delete the image each time (see here for a stackexhange related question).
That being said, I've never gotten my Eltrons to successfully print an image (but my jobs don't require it).
Good luck!!
EDIT: Here's another link with example Perl code. They're aiming for Chinese characters but show how to print the Great Wave image (which oddly is Japanese).
I found that it is not possible to send a graphic to a Zebra printer with EPL using ASCII characters. The data must actually be sent as RAW data. So, for example, you can't send a graphic to the printer using Zebra Setup Utilities, or through any other means that cannot write RAW data from a file directly through the printer.
The only way around this I've found is to create the label as an image and send that image to the printer via a print command within your application.
I am integrating with UPS's Shipping Web Services to improve our warehouse's daily process. UPS returns a shipping label for a package in EPL (Eltron Programming Language). I was able to print the label successfully from C#. However my company uses a perforated label that has a doc tab/label beneath the shipping label that can be attached to any internal documentation. UPS's World Ship software has the ability to print information to this doc tab/label and the business users are requesting that mine does the same.
I contacted UPS and their web service does not support returning the doc tab/label in EPL so I embarked on doing it myself. The first thing I tried to do was to just get an idea of trying to print something below the shipping label. So I tried this command.
A12,1210,0,3,1,1,N,"ACCT#"
I appended this to the end of the EPL provided by UPS and it printed at the very bottom of the 4x6 shipping label. So I then started increasing from 1210 to 1250 and noticed that now my ACCT# string didn't print at all. Upon researching some more I thought maybe the EPL from UPS was setting the label height to 4x6 making it so that I couldn't print. (The label itself is 4x8 with the bottom 2 inches being the doc label). Upon checking their EPL I see the following codes at the start.
q795
Q1600,24
Reading the EPL Programming manual that came with the Zebra ZP 450 printer I am using tells me that this should set the print height and width to 4x8 which left me stumped. So then I thought maybe since I was appending it to the end of the EPL provided by UPS that the printer was ignoring it since it was after the P1 command. So I tried appending it to the beginning of the EPL string provided by UPS and that didn't make any difference either.
What can I do to get both the shipping label and the doc tab/label to print?
We use this to include a DocTab in our NRGship for UPS labels. It gets inserted BEFORE the P1\n at the end of the UPS label.
"\nA17,1330,0,3,1,1,N,\"[date] PACKAGE WEIGHT [weight] [units]\"\nA668,1330,0,4,1,1,N,\"[multi]\"\nA17,1360,0,3,1,1,N,\"SERVICE [service]\"\nA17,1390,0,3,1,1,N,\"TRACKING# [tracknum]\"\nA17,1420,0,3,1,1,N,\"PACKAGE SERVICE OPTION CHARGES [charges] [currency]\"\nA17,1450,0,3,1,1,N,\"REF 1: [ref1]\"\nA17,1480,0,3,1,1,N,\"REF 2: [ref2]\"\nA17,1540,0,3,1,1,N,\"TOTAL BILLED WEIGHT [totalbilledweight] [units]\"\nA17,1570,0,3,1,1,N,\"TOTAL SHIPMENT CHARGES [totalcharges] [currency]\"\nA17,1600,0,3,1,1,N,\"[negotiated]\"\n"
You may need to replace \n and \" in your coding.
If it were me I would download bartender and then download the bartender printer drivers for an Eltron printer. Set up a dummy printer that prints to a file that uses the eltron printer drivers. Open bartender and create a label with the additional text you want to see at the bottom and print this to your dummy printer that prints to a file. This will give you the raw EPL. You should be able to take this file and see what you need to do in your EPL to make it print correctly.