Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing barcodes in linux

Status
Not open for further replies.

ryan010101

Technical User
Jan 24, 2001
83
US
My company needs a solution to print barcodes on our orders for the warehouse to scan. We were considering buying a barcode DIMM for our HP printers but were hoping for a software solution. I'm not sure if this is possible but it would basically need to print a plain text file and have certain characters turned into a bar code. Is this possible?

thanks
Ryan
 
You can certainly download a soft font to the printer, and print the barcode.

Depending on the barcode symbology you use, you may have to calculate a checksum that becomes included in the barcode data.

What application will generate the data?

Jim Asman
jlasman@telus.net
 
The application is called Southware (it is our accounting/inventory software that runs the company). Basically it uses a text file as a template. This text file has all kinda of tags/code to layout the file. So I would need to be able to put a tag of some sort in this file to make it print the bar code. I'm really not exactly sure how this works at all. I thought maybe there was a program (hopefully free) which would let us do this without buying the DIMMs (as we'd like to be able to print to any printer in the building).

thanks for the quick reply.
 
Well the DIMMs really don't do any more for you than a soft font. In fact the soft font is better as it can be downloaded to any laser printer, whereas, the DIMM is obviously dedicated to a single printer.

What I usually do is to download the barcode font and designate it as the secondary font. Then when it is time to pint a barcode, issue the 1 byte command to switch to the secondary, print the data, and then another one byte command to jump back to the primary font.

It is really an issue of the ability your application to inject the necessary codes in a timely manner that is central. If you can work with a 3of9 barcode, then you won't have to worry about the checksum.

Jim Asman
jlasman@telus.net
 
Hmm I don't know if it can do that. I'm a Linux novice so I don't really have any idea how to go about this. Is it possible to just print a text file (say from VI) and insert codes that would make the barcode print?

thanks
Ryan
 
Of course you can. Assuming the barcode font was resident in the printer and set up as the secondary...

To encode 123456 as a 3of9, you would type...

^N*123456*^O

The first and last are control characters. The '*' are required for 3of9 formatting.

To enter ^N which is the single character chr(14) ...

enter CTRL-V followed by CTRL-N

and similarly..

enter CTRL-V followed by CTRL-O

for the final character.

Jim Asman
jlasman@telus.net
 
So how would I go about sending the font to the printer and making it the secondary font? Is that something that is done on a per print basis?

thanks for all your help!
 
Well, as long as the font arrives at the printer before it is used, you are fine. So if the font is set as permanent, you could simply 'lp' it before the operation began. The downloaded font will have a unique ID #, let's say 39. :)

Then in the application you make it the secondary with the code... ^[)39X where ^[ is CTRL-V ESC

Once the font has been downloaded to the printer, it will remain available until the printer is powered off or it has been specifically replaced or deleted.

Jim Asman
jlasman@telus.net
 
Hi...

a software only solution would be a filter for the spool system.

This kind of solution generates bar code drawing commands on the fly, while the print job file is processed by the print spool system.

You could try this software (free download):

It can create bar code images for Postscript and PCL based printers. With filter control sequences added to the document, you adjust bar code type, size, check digit and the bar code data.

Hope this info helps...

Harald
 
I installed the TCBLinux software and was able to print a test file they provide. It appears that it will only work with PostScript files, can anybody confirm this? I need to be able to print bar codes from a text file. If anybody has any idea please let me know.

thanks
Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top