Printing barcodes on Epson thermal printer - epson

I have acquired an Epson thermal printer (TM-T82II) with a control utility (APD5) that allows me to configure and test the printer. I use the utility to (try to) print barcodes, but cannot find any documentation on how to make use of the Code128 support I need.
I want to print out a Code 128 barcode for "PQR123X1122331807110011223344". I seem to be able to do this by specifying a test string of "{APQR123X1122331807110011223344" to encode the string in Font A, and likewise use "{BPQR123X1122331807110011223344" to encode it entirely in Font B. Both generate barcodes too wide for the paper I have. However, there is a large run of digits after the "X" which is more efficiently encoded in Font C and that I know will fit (I have an example from another printer). The obvious thing of using "{APQR123X{C1122331807110011223344" produces garbage.
Can anyone point to documentation that unravels how Epson do font-switching in Code 128?

#Omatai,
Epson's ESC/POS printer language does not use fonts for rendering barcodes. If you are directly sending escape codes to the Epson printer, GS w is the command to set the barcode width in ESC/POS, where w is a number between from 2 (thinnest) to 6 (thickest) which specifies the width of the barcode's minimum element. The actual measurement is dependent on the model of the Epson printer.
Epson ESC/POS Documentation: https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=2
To help you further, this group would need to know more about the programming model that you are using and the associated code that you are attempting to use.
Terry Warwick, Microsoft

Related

Cannot read barcode produced by ZPL Code 39

I am trying to print a barcode (code 39) to a label (2" x .75") on a Zebra ZT610 (600 DPI) printer, but none of our 3 barcode scanners will decode the barcode. We are encoding a 14-character alphanumeric value. I created the label using ZebraDesigner, and passed the ZPL to the printer using Zebra Setup Utilities. I also use Labelary to check the label, and change parameter values.
I have tried every conceivable combination of the ^BY and ^B3 commands I can think of, that would fit on the label, including shortening the data for testing (encode only 8 characters). Here is the latest ZPL with a barcode that should be well within the label's printable area, but scanners will not read it:
^XA~JSN^LT0^MNM^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ
^XA^MMT^PW1200^LL0449^LS0^XZ
^XA^BY4,3,143^FT82,192^B3N,N,,N,N
^FD2116A83034137M^FS
^FT39,258^AAN,45,25^FH^FD2116A83034137M^FS
^PQ1,0,1,Y^XZ
Unreadable label image:
We also have an old Zebra R110Xi4 (203 DPI) printer that we also print code 39 barcodes to, on the same labels. The barcodes on these labels are perfectly readable by the scanners. This is the ZPL for it:
^XA~JSN^LT0^MNM^MTT^PON^PMN^LH0,0^JMA^PR8,8~SD30^JUS^LRN^CI0^XZ
^XA^MMT^LL0102^PW379^LS0^XZ
^XA^BY1,3,40^FT50,54^B3N,N,,N,N
^FD2116A83034137M^FS
^FT0,73^ABN,11,7
^FD2116A83034137M^FS
^PQ1,0,1,Y^XZ
Are there any suggestions as to what I might try next?
Thank you!

ZPL setup GX430t

I use Raspberry Pi connected to a Zebra GX430t with CUPS. I use the "Local Raw Printer" driver and I send the ZPL directly to the printer using Python.
I use the termal transfert mode, but I have a problem with the printer (300dpi), because the printing of the datamatrix is quite blurry, so I can't read it.
I emailed the Zebra support, and they told me to modify the temperature of the printing head, but I have no clue on how to do it with ZPL. I also have to modify the grayscale with ZPL. Do you know how to do one of this commands please ?
Plus, could you confirm that ^MTT is the command to set the printer to Thermal Transfert and that ^PW is used to set the width of the label ? Is the configuration saved in the printer, even when turned off, until the configuration change ?
Use ^MDa command. where a is the value of the darkness level. Value is 0 to 30 in increments of 0.1.
Yes, ^MTa sets printer mode where a is the setting, T= Thermal Transfer, D= Direct

noedynamic barcode on thermal printers are not scanned

I am printing barcodes using neodynamic but there are issues in scanning on thermal printers while printing on laser printer, can scan easily. I have zebra printer TLP 2844. When code is like "G00001" then it scan but when code is like "G00001-ABC-ABC" it is not scanned. Barcode settings are
barcode.Symbology = Symbology.Code128
barcode.BarWidth = 0.2
barcode.BarHeight = 5
barcode.TextAlignment = Alignment.AboveLeft
barcode.CodeAlignment = Alignment.BelowLeft
Thanks in advance.
The main issue here is that Neodynamic Barcode generates an image that gets printed. On the Zebra that image might be too low in resolution.
Do you only use the Neodynamic Barcode? If so, and under the premise that you need to use Neodynamic, then you need to get the Neodynamic ThermalLabel SDK, otherwise I'd recommend that you create the label layout in ZPL/EPL directly, then you can tell the printer directly to create a barcode of a specific symbology and content and it'll do the job just fine for you.

Which should not be included in this ZPL Code?

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.

Printing a graphic to a Zebra LP2844 with the GW EPL command?

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.

Resources