How to print barcode labels from your program

Sometimes you need to print labels from a program you are writing. Here’s a few tricks to make that job easier.

You can develop a label format in its native language of IPL, ZPL, Direct Protocol, etc (there’s a bunch of them) but an easier method is to use a design tool, which are available for free from printer manufacturers and capture its output.  For Intermec printers you can download Bartender UltraLite from the Honeywell web site here. You’ll need to sign up to get an account and you’ll have to use their download tool, which works with Windows 7 but not 10.

Next, download the appropriate printer driver for your target printer. You can get these from the same Honeywell site or from Seagull Scientific.

Once you have the software and driver installed, use Bartender to design your label:

Print your label to check that it looks the way you want and you can then print your template to disk for later inclusion into your code.

Find the printer driver and open the Printer Properties page. Click on the Port Tab and change the Port to “File”:

Now print your label from Bartender again. A dialog box will pop up asking you for a file name and location to save the output. Once this is done you can open the file with a text editor and look at the data. The label above created this output file:

<xpml><page quantity=’0′ pitch=’50.8 mm’></xpml>’Seagull:2.1:DP
INPUT OFF
VERBOFF
INPUT ON
SYSVAR(48) = 0
ERROR 15,”FONT NOT FOUND”
ERROR 18,”DISK FULL”
ERROR 26,”PARAMETER TOO LARGE”
ERROR 27,”PARAMETER TOO SMALL”
ERROR 37,”CUTTER DEVICE NOT FOUND”
ERROR 1003,”FIELD OUT OF LABEL”
SYSVAR(35)=0
OPEN “tmp:setup.sys” FOR OUTPUT AS #1
PRINT#1,”MEDIA,MEDIA SIZE,XSTART,0″
PRINT#1,”PRINT DEFS,PRINT SPEED,200″
CLOSE #1
SETUP “tmp:setup.sys”
KILL “tmp:setup.sys”
CLIP ON
CLIP BARCODE ON
LBLCOND 3,0
<xpml></page></xpml><xpml><page quantity=’1′ pitch=’50.8 mm’></xpml>CLL
OPTIMIZE “BATCH” ON
PP373,698:AN7
BARSET “CODE128C”,2,1,6,203
PB “12345678”
PP474,495:NASC 1252
FT “Dutch 801 Roman BT”
FONTSIZE 12
FONTSLANT 0
PT “12345678”
PP325,297:PT “Sample Text”
LAYOUT RUN “”
PF
PRINT KEY OFF
<xpml></page></xpml><xpml><end/></xpml>

You can get rid of of the overhead and just keep the portion that actually prints the label:

PP373,698:AN7
BARSET “CODE128C”,2,1,6,203
PB “12345678”
PP474,495:NASC 1252
FT “Dutch 801 Roman BT”
FONTSIZE 12
FONTSLANT 0
PT “12345678”
PP325,297:PT “Sample Text”
PF

You can replace the two fixed text fields “12345678” and “Sample Text” with variable names and include it in your code.

You can test print the small file above by making an FTP connection from a command line to the printer and use PUT to sendthe label format to location PR1. As an example:

One label printer after the PUT command. Hope this helps.

My favorite scanner – Part 2

I’ve written about the center decode feature in the Intermec EA30 scan engine (see part 1 below) but there are a few other features I’d like to bring to your attention.

Presentation Mode:  Sometimes scanners are used with desktop holders to let a user pass a barcode underneath it and scan hands free. Think of a library check out, a convenience store cash register, or a club scanning ID cards.

Laser scanners typically pulse their laser on and off when they are in presentation mode (which drives me nuts) in order to detect the presence of a barcode.  2D Camera based scanners have an advantage of being omnidirectional and they will have some illumination on to detect a code.

The EA30 does presentation mode right. The scanner uses ambient light to detect a bar code, so no distracting lights come out of the scanner when it’s idle.

The EA30 scanner can be set up to scan more than one barcode at a time.  Take a look at EasySet under Symbologies, and you’ll see the Multicode set up:

You can specify the number and type of codes to scan and because of the way the software scans the image, it’s works as quickly as if you were scanning a single code. Other scanners can read multiple barcodes, but you have to move the scanner around to pick up all of the codes. The EA30 works better than this; the software scans the image so you don’t have to move the scanner. Try it out.

The last feature I’ll mention is the ability to scan both UPC-A symbols and UPC symbols with supplemental codes with one configuration:

Reading both UPC and with one set up is difficult because the large portion of the UPC with supplemental code is a valid UPC-A symbol. The scanner must reliably detect the presence of the supplemental and read it. If you want to test this, use these setting from EasySet:

Consecutive validations = 2
Center decode = on
Supplemental = Transmit if found
Add on security = 100
Imager decode mode = 2D
Initial 1D search = Full

You’ll find these settings in the Symbology section, the Imager Settings, and the Operating Section.

 

 

 

My favorite scanner – Part 1

The Intermec (now Honeywell) EA30 scanner has a really great feature. It is a camera based scanner, so it can read both 1D (UPC, Code 128, Code 39) and 2D (Datamatrix, QR Code, Postnet) codes. It has a bright white illuminator and a laser aimer that looks like this:

It’s now common for a labels to have multiple bar codes on them and it can be difficult to scan only the one you intend, especially if they are crowded together:

You can enable Center Decoding in the EA30 using EasySet (under Operating Settings, Data Decode Security, Center Decoding) that instructs the scanner to only decode a symbol when the center dot on the aiming pattern is on a barcode.

So this will read:

And this will not:

It’s pretty intuitive, aim the dot where you want to scan.  If you ever have to scan a large number of bar codes during a shipping or receiving transaction, serial numbers for example, this feature can save a lot of time and aggravation.

There are other scanners that have a feature that is similar to center decoding in the EA30, but without the center aiming dot, they’re difficult to use, and some scanners depth of field (range, or scanning distance) is reduced when you turn centering on. This doesn’t happen with the EA30.

There are other nice features in the EA30 that I’ll cover in later posts.

The EA30 scan engine in available in the SG20 tethered and wireless scanners, and the CK3 hand held computer.