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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Code 39 Bar Codes from DOS 1

Status
Not open for further replies.

dbmk

Programmer
Nov 28, 2002
6
0
0
CA
Is there any way to print barcodes from DOS?

I downloaded a program called Thunder Bar from this website. But I couldn't get this program to print the barcodes, they appear as text.


Any help would be greatly appreciated.
 
If you are printing to a LaserJet, get a soft font in HP Bitmap format, and you're in business.


Jim Asman
jlasman@telus.net
 
I am printing to an HP LaserJet that is on a network. Where would I be able to find a soft font in HP bitmap format? Do I need any special font managers for the printer?
 
Just get a barcode true type font from the web. You can also use the HP Bar Codes and More font product (a SIMM, DIMM or cartridge), but control is a little harder and the barcode size is limited. For specialized apps, you can even use a program (C, C++) to draw small PCL or GL/2 rectangles (to build barcodes). There is a book about HP PCL and barcodes that shows how. I don't have the name of the book right now.
Mike
 
You can't use a TrueType font from DOS. You should be able to find a bitmap 3of 9 font on the web.

In use, you need to assign the font an ID number, and that is used to call the font from your application. I typically set the barcode font up as the secondary font if I am printing other text where the text is the primary font.

Lets make the font ID 39.

If you send to the printer ...

<esc>*c39D Declare Font ID
Font File Bitmap Font Info
<esc>*c5F Make Font Permanent (Not Necessary, but
would allow you to
send font to printer
before your application
began)

Inside your application...

<esc>)39X Decare font 39 as the secondary

To print your barcode data...

chr(14)*barcodedata*chr(15)

The chr(14) activates secondary font, and chr(15) returns you to the primary.



Jim Asman
jlasman@telus.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top