terry@joshua.math.ucla.edu (08/10/89)
Thanks to all those who responded to my query about bar code generators. Here is a summary of the responses I received. It has been cross-posted to appropriate newsgroups. Terry McKiernan terry@math.ucla.edu (213) 825-9040 ----------------------------------------------------------------------------- From: rose@cs.wisc.edu (Scott Rose) my company SELLS barcode fonts. i know none of the details, but call (800) 351-0500 for the scoop. ------------------------------------------------------------------------------ From: spcecdt@ucscb.UCSC.EDU (Space Cadet) Worthington Data Solutions sells bar code readers & label generators. Don't know how much they go for. Their number is 408-458-9938. ------------------------------------------------------------------------------ From: Brian Vanlandingham <bvan@uncecs.edu> 10 '************************************************************************** 20 '***** CODE 3-of-9 BAR CODE GENERATOR ***** 30 '***** ******************************* ***** 40 '***** This program will generate standard 3-of-9 bar code ***** 50 '***** on any dot matrix printer which is compatable with ***** 60 '***** an Epson or IBM graphics printer. ***** 70 '***** ****************************** ***** 80 '***** - SPECIFICATIONS - ***** 90 '** ** 100 '** W N ** 110 '** | Nominal Width | Nominal Width | Nominal Ratio ** 120 '** Density | of | of | of ** 130 '** (Characters/ | Narrow Bars and | Wide Bars and | Wide to Narrow ** 140 '** Inch) | Spaces (Inches) | Spaces (Inches)| Element Width ** 150 '** -------------+-----------------+----------------+---------------- ** 160 '** 5.730 | 0.0125 | 0.0315 | 2.52 ** 170 '** -------------+-----------------+----------------+---------------- ** 180 '** ** 190 '***** ****************************** ***** 200 '***** Code 3-of-9 was developed in 1974 by Dr. David C. Allais of ***** 210 '***** Interface Mechanisms, Inc. It has been adopted as the ***** 220 '***** standard bar code symbology of the Department of Defence ***** 230 '***** (MIL-STD-1189) and is the most widely used alphanumeric bar ***** 240 '***** code in use. Code 3-of-9 is so called because the original ***** 250 '***** concept provided for 39 data characters. The name also ***** 260 '***** describes the structure of the code which has 3 wide elements ***** 270 '***** out of a total of 9. ***** 280 '***** ***** 290 '***** For best results use only even numbered values for height ***** 300 '***** and use a height which is approx 15% of the total code ***** 310 '***** length. ***** 320 '***** ***** 330 '***** This program was written solely for information purposes to ***** 340 '***** demonstrate the structure of code 3-of-9. The author is ***** 350 '***** not responsible for any damages incurred through the use of ***** 360 '***** this program. ***** 370 '***** ***** 380 '***** Bill Wood Milwaukee, WI 05/18/85 ***** 390 '************************************************************************** 400 ' 410 DIM X(30),M(30),P$(30),A$(30) 420 ' 430 '***** generate data entry screen 440 ' 450 KEY OFF 460 CLS 470 COLOR 7 480 PRINT "IMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM;" 490 FOR P=1 TO 3 500 PRINT ": :" 510 NEXT P 520 PRINT "LMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM9 530 FOR P=1 TO 5 540 PRINT ": :" 550 NEXT P 560 PRINT "HMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM<" 570 ' 580 '***** display menu and get input from user 590 ' 600 LOCATE 3,5 :COLOR 4 :PRINT "CODE 3-OF-9 BAR CODE GENERATOR" 610 LOCATE 6,3 :COLOR 6 :PRINT "1 Print Data from CONSOLE" 620 LOCATE 7,3 :COLOR 6 :PRINT "2 Print Data from FILE " 630 LOCATE 8,3 :COLOR 6 :PRINT "3 ADD Data to FILE " 640 LOCATE 9,3 :COLOR 6 :PRINT "Q QUIT " 650 LOCATE 10,10:COLOR 6 :PRINT "==>" 660 LOCATE 10,14:COLOR 10:INPUT " ",SELECT$ 670 IF SELECT$="Q" THEN GOTO 1900 680 GOSUB 2220 690 IF SELECT$="1" THEN GOTO 730 700 IF SELECT$="2" THEN GOTO 740 710 IF SELECT$="3" THEN GOTO 750 720 GOTO 450 730 GOSUB 1950 :GOSUB 790 :GOTO 450 740 OPEN "CODE39.DAT" FOR INPUT AS #1 :GOTO 2030 750 OPEN "CODE39.DAT" FOR APPEND AS #1 :GOTO 2130 760 ' 770 '***** add start and stop characters to user message (*) 780 ' 790 MSG$="*"+MSG$+"*" :S$="" 800 ' 810 '***** define print head pins to fire 820 ' 830 NS$=CHR$(0)+CHR$(0) 840 WS$=CHR$(0)+CHR$(0)+CHR$(0)+CHR$(0) 850 NB$=CHR$(255) 860 WB$=CHR$(255)+CHR$(255)+CHR$(255) 870 ' 880 '***** decode message into bar code 890 ' 900 L=LEN(MSG$) 910 FOR X=1 TO L 920 TEST$=MID$(MSG$,X,1) 930 IF TEST$="1" THEN L$=WB$+NS$+NB$+WS$+NB$+NS$+NB$+NS$+WB$ :GOTO 1430 940 IF TEST$="2" THEN L$=NB$+NS$+WB$+WS$+NB$+NS$+NB$+NS$+WB$ :GOTO 1430 950 IF TEST$="3" THEN L$=WB$+NS$+WB$+WS$+NB$+NS$+NB$+NS$+NB$ :GOTO 1430 960 IF TEST$="4" THEN L$=NB$+NS$+NB$+WS$+WB$+NS$+NB$+NS$+WB$ :GOTO 1430 970 IF TEST$="5" THEN L$=WB$+NS$+NB$+WS$+WB$+NS$+NB$+NS$+NB$ :GOTO 1430 980 IF TEST$="6" THEN L$=NB$+NS$+WB$+WS$+WB$+NS$+NB$+NS$+NB$ :GOTO 1430 990 IF TEST$="7" THEN L$=NB$+NS$+NB$+WS$+NB$+NS$+WB$+NS$+WB$ :GOTO 1430 1000 IF TEST$="8" THEN L$=WB$+NS$+NB$+WS$+NB$+NS$+WB$+NS$+NB$ :GOTO 1430 1010 IF TEST$="9" THEN L$=NB$+NS$+WB$+WS$+NB$+NS$+WB$+NS$+NB$ :GOTO 1430 1020 IF TEST$="0" THEN L$=NB$+NS$+NB$+WS$+WB$+NS$+WB$+NS$+NB$ :GOTO 1430 1030 IF TEST$="A" THEN L$=WB$+NS$+NB$+NS$+NB$+WS$+NB$+NS$+WB$ :GOTO 1430 1040 IF TEST$="B" THEN L$=NB$+NS$+WB$+NS$+NB$+WS$+NB$+NS$+WB$ :GOTO 1430 1050 IF TEST$="C" THEN L$=WB$+NS$+WB$+NS$+NB$+WS$+NB$+NS$+NB$ :GOTO 1430 1060 IF TEST$="D" THEN L$=NB$+NS$+NB$+NS$+WB$+WS$+NB$+NS$+WB$ :GOTO 1430 1070 IF TEST$="E" THEN L$=WB$+NS$+NB$+NS$+WB$+WS$+NB$+NS$+NB$ :GOTO 1430 1080 IF TEST$="F" THEN L$=NB$+NS$+WB$+NS$+WB$+WS$+NB$+NS$+NB$ :GOTO 1430 1090 IF TEST$="G" THEN L$=NB$+NS$+NB$+NS$+NB$+WS$+WB$+NS$+WB$ :GOTO 1430 1100 IF TEST$="H" THEN L$=WB$+NS$+NB$+NS$+NB$+WS$+WB$+NS$+NB$ :GOTO 1430 1110 IF TEST$="I" THEN L$=NB$+NS$+WB$+NS$+NB$+WS$+WB$+NS$+NB$ :GOTO 1430 1120 IF TEST$="J" THEN L$=NB$+NS$+NB$+NS$+WB$+WS$+WB$+NS$+NB$ :GOTO 1430 1130 IF TEST$="K" THEN L$=WB$+NS$+NB$+NS$+NB$+NS$+NB$+WS$+WB$ :GOTO 1430 1140 IF TEST$="L" THEN L$=NB$+NS$+WB$+NS$+NB$+NS$+NB$+WS$+WB$ :GOTO 1430 1150 IF TEST$="M" THEN L$=WB$+NS$+WB$+NS$+NB$+NS$+NB$+WS$+NB$ :GOTO 1430 1160 IF TEST$="N" THEN L$=NB$+NS$+NB$+NS$+WB$+NS$+NB$+WS$+WB$ :GOTO 1430 1170 IF TEST$="O" THEN L$=WB$+NS$+NB$+NS$+WB$+NS$+NB$+WS$+NB$ :GOTO 1430 1180 IF TEST$="P" THEN L$=NB$+NS$+WB$+NS$+WB$+NS$+NB$+WS$+NB$ :GOTO 1430 1190 IF TEST$="Q" THEN L$=NB$+NS$+NB$+NS$+NB$+NS$+WB$+WS$+WB$ :GOTO 1430 1200 IF TEST$="R" THEN L$=WB$+NS$+NB$+NS$+NB$+NS$+WB$+WS$+NB$ :GOTO 1430 1210 IF TEST$="S" THEN L$=NB$+NS$+WB$+NS$+NB$+NS$+WB$+WS$+NB$ :GOTO 1430 1220 IF TEST$="T" THEN L$=NB$+NS$+NB$+NS$+WB$+NS$+WB$+WS$+NB$ :GOTO 1430 1230 IF TEST$="U" THEN L$=WB$+WS$+NB$+NS$+NB$+NS$+NB$+NS$+WB$ :GOTO 1430 1240 IF TEST$="V" THEN L$=NB$+WS$+WB$+NS$+NB$+NS$+NB$+NS$+WB$ :GOTO 1430 1250 IF TEST$="W" THEN L$=WB$+WS$+WB$+NS$+NB$+NS$+NB$+NS$+NB$ :GOTO 1430 1260 IF TEST$="X" THEN L$=NB$+WS$+NB$+NS$+WB$+NS$+NB$+NS$+WB$ :GOTO 1430 1270 IF TEST$="Y" THEN L$=WB$+WS$+NB$+NS$+WB$+NS$+NB$+NS$+NB$ :GOTO 1430 1280 IF TEST$="Z" THEN L$=NB$+WS$+WB$+NS$+WB$+NS$+NB$+NS$+NB$ :GOTO 1430 1290 IF TEST$="-" THEN L$=NB$+WS$+NB$+NS$+NB$+NS$+WB$+NS$+WB$ :GOTO 1430 1300 IF TEST$="." THEN L$=WB$+WS$+NB$+NS$+NB$+NS$+WB$+NS$+NB$ :GOTO 1430 1310 IF TEST$=" " THEN L$=NB$+WS$+WB$+NS$+NB$+NS$+WB$+NS$+NB$ :GOTO 1430 1320 IF TEST$="*" THEN L$=NB$+WS$+NB$+NS$+WB$+NS$+WB$+NS$+NB$ :GOTO 1430 1330 IF TEST$="$" THEN L$=NB$+WS$+NB$+WS$+NB$+WS$+NB$+NS$+NB$ :GOTO 1430 1340 IF TEST$="/" THEN L$=NB$+WS$+NB$+WS$+NB$+NS$+NB$+WS$+NB$ :GOTO 1430 1350 IF TEST$="+" THEN L$=NB$+WS$+NB$+NS$+NB$+WS$+NB$+WS$+NB$ :GOTO 1430 1360 IF TEST$="%" THEN L$=NB$+NS$+NB$+WS$+NB$+WS$+NB$+WS$+NB$ :GOTO 1430 1370 ' 1380 '***** print error message if input is invalid 1390 ' 1400 LOCATE 7,3 :COLOR 11 :PRINT " INVALID CHARACTER DETECTED!!! " 1410 LOCATE 9,3 :COLOR 28 :PRINT " ";TEST$;" " 1420 LOCATE 15,8 :COLOR 14 :PRINT "*** PROCESSING ABORTED ***":GOTO 1900 1430 P$(X)=L$ 1440 ' 1450 '***** develop human readable text to be printed under bar code 1460 ' 1470 A$(X)=TEST$ 1480 IF X=15 OR X=25 THEN GOTO 1500 1490 IF X>2 AND (X MOD 2)>0 THEN S$=S$+" " 1500 NEXT X 1510 ' 1520 '***** set printer to 2/216 lines per inch 1530 ' 1540 WIDTH "LPT1:",255 1550 LPRINT CHR$(27);CHR$(51);CHR$(2); 1560 ' 1570 '***** calculate N1 and N2 values for dot graphics command 1580 ' 1590 COLS=21 1600 N1=COLS MOD 256 1610 N2=FIX(COLS/256) 1620 ' 1630 '***** print each character of bar code 1640 ' 1650 LOCATE 7,3 :COLOR 1 :PRINT "PRINTING- " 1660 HIGH=ABS(HIGH):IF HIGH=0 THEN HIGH=2 1670 FOR H=1 TO HIGH 1680 FOR N=L TO 1 STEP -1 1690 LOCATE 7,(N+12) :PRINT " " 1700 NEXT N 1710 FOR M=1 TO L 1720 LOCATE 7,(M+11) :COLOR 11 :PRINT A$(M) 1730 LPRINT CHR$(27);CHR$(76);CHR$(N1);CHR$(N2);P$(M);NS$; 1740 NEXT M 1750 ' 1760 '***** set printer to 19/216 lines per inch every other line 1770 ' 1780 IF (H MOD 2)=0 THEN LPRINT CHR$(27);CHR$(74);CHR$(19); 1790 LPRINT 1800 LOCATE 9,3 :COLOR 1 :PRINT " PASS-" 1810 LOCATE 9,12 :COLOR 11 :PRINT H 1820 LOCATE 9,15 :COLOR 1 :PRINT " COMPLETE " 1830 NEXT H 1840 ' 1850 '***** reset printer to default and print human readable text 1860 ' 1870 LPRINT CHR$(27)"@" 1880 LPRINT S$;MSG$ 1890 RETURN 1900 LOCATE 20,1 :COLOR 7,0,0 :PRINT 1910 END 1920 ' 1930 '***** enter data from console 1940 ' 1950 LOCATE 7,3 :COLOR 6 :PRINT "ENTER MESSAGE:" 1960 LOCATE 7,17 :COLOR 10:INPUT " ",MSG$ 1970 LOCATE 9,3 :COLOR 6 :PRINT " ENTER HEIGHT:" 1980 LOCATE 9,17 :COLOR 10:INPUT " ",HIGH 1990 RETURN 2000 ' 2010 '***** read data from file 2020 ' 2030 LOCATE 9,3 :COLOR 6 :PRINT " ENTER HEIGHT:" 2040 LOCATE 9,17 :COLOR 10:INPUT " ",HIGH 2050 GOSUB 2220 2060 INPUT #1,MSG$ 2070 GOSUB 790 2080 IF EOF(1) THEN CLOSE #1 :GOTO 450 2090 GOTO 2060 2100 ' 2110 '***** write data to file 2120 ' 2130 LOCATE 7,3 :COLOR 6 :PRINT "ENTER MESSAGE (press enter to quit) " 2140 LOCATE 9,10 :COLOR 6 :PRINT "==> " 2150 LOCATE 9,14 :COLOR 10:INPUT " ",MSG$ 2160 IF MSG$="" THEN CLOSE #1 :GOTO 450 2170 PRINT #1,MSG$ :GOSUB 2220 2180 GOTO 2130 2190 ' 2200 '***** clear data entry area 2210 ' 2220 LOCATE 6,2 :PRINT " " 2230 LOCATE 7,2 :PRINT " " 2240 LOCATE 8,2 :PRINT " " 2250 LOCATE 9,2 :PRINT " " 2260 LOCATE 10,2 :PRINT " " 2270 RETURN ---------------------------------------------------------------------------- From: Brian Vanlandingham <bvan@uncecs.edu> ************************************************************************** * Program...: CODE39.PRG * Version...: 1.0 * Function..: Prints 3 of 9 barcodes * * Source....: Clipper (Summer '87) * Libraries.: CLIPPER.LIB (c) Nantucket Corporation (Summer '87) * EXTEND.LIB (c) Nantucket Corporation (Summer '87) * * Author....: George T. Neill * 2140 Main Street * La Crosse, WI 54601 * * Created...: May 5, 1988 at 10:21 am * Copyright.: None, released to the public domain as is with no express * or implied warranty as to suitability or accuracy of this * program. The author shall not be held liable for any * damages, either direct or non-direct, arising from the use * of this program. This program may be modified and/or * included in any program without any consideration to the * author. ************************************************************************** * Revisions: * Date Time Who Change Description * DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD- * ************************************************************************** ************************************************************************** ***** CODE 3-of-9 BAR CODE GENERATOR ***** ***** ******************************* ***** ***** This program will generate standard 3-of-9 bar code ***** ***** on any dot matrix printer which is compatable with ***** ***** an Epson/IBM graphics printer or HP LaserJet. ***** ***** ****************************** ***** ***** - SPECIFICATIONS - ***** ** ** ** W N ** ** | Nominal Width | Nominal Width | Nominal Ratio ** ** Density | of | of | of ** ** (Characters/ | Narrow Bars and | Wide Bars and | Wide to Narrow ** ** Inch) | Spaces (Inches) | Spaces (Inches)| Element Width ** ** -------------+-----------------+----------------+---------------- ** ** 5.730 | 0.0125 | 0.0315 | 2.52 ** ** -------------+-----------------+----------------+---------------- ** ** ** ***** ****************************** ***** ***** Code 3-of-9 was developed in 1974 by Dr. David C. Allais of ***** ***** Interface Mechanisms, Inc. It has been adopted as the ***** ***** standard bar code symbology of the Department of Defence ***** ***** (MIL-STD-1189) and is the most widely used alphanumeric bar ***** ***** code in use. Code 3-of-9 is so called because the original ***** ***** concept provided for 39 data characters. The name also ***** ***** describes the structure of the code which has 3 wide elements ***** ***** out of a total of 9. ***** ***** ***** ***** This program was written solely for information purposes to ***** ***** demonstrate the structure of code 3-of-9. The author is ***** ***** not responsible for any damages incurred through the use of ***** ***** this program. ***** ***** ***** ***** Bill Wood Milwaukee, WI 05/18/85 ***** ************************************************************************** ************************************************************************** ***** ***** ***** This dBase code originated from a basic program written by ***** ***** Bill Wood of Milwaukee, WI in May of 1985. I have, of course,***** ***** converted it to dBase and added support for the HP LaserJet. ***** ***** ***** ***** Because of the wide variety and quality of bar code readers ***** ***** and barcode print quality when using a dot matrix printer, I ***** ***** strongly recommend using a laser printer for your barcodes. ***** ***** Also, the you will get 7 characters per inch on the laser as ***** ***** opposed to 5.6 cpi on a dot matrix. ***** ***** ***** ***** The LaserJet barcodes are generated using the pattern fill ***** ***** functions and do not require the use of any font cartridges ***** ***** or soft fonts. The tricky part of using this method is ***** ***** following the HP cusor location on the printed page. Please ***** ***** refer to the HP LaserJet Technical Reference Manual for a ***** ***** thorough explanation of this. Currently, the program is ***** ***** setup to print at 6 lines per inch. That is, a height of 1 ***** ***** is equal to one line. ***** ***** ***** ***** The program requires two functions, the printer setup, and ***** ***** the barcode creation. The printer setup defines the ***** ***** components of the barcode and the barcode creation builds ***** ***** the barcode from a passed character string. Using this ***** ***** program as an example you should be able to generate a ***** ***** barcode routine for any printer or barcode symbology. ***** ***** ***** ***** Good Luck, ***** ***** George T. Neill ***** ************************************************************************** ************************************************************************** ***** Program Setup ***** clear screen public esc,null,printer,height esc = chr(27) null = "" @ 01,01 say [Code 39 Barcode Generator] ***** get printer type ***** * default to two line LaserJet barcode printer = "L" height = 2 @ 03,01 say [Print on (E)pson or (L)aserJet?] ; get m->PRINTER ; picture '@!'; valid printer$'EL' @ 04,01 say [Enter Height of Barcode (1-4)] ; get m->HEIGHT ; picture '9' ; range 1,4 read if printer = "L" do setup_hp elseif printer = "E" do setup_epson endif ***** Define CODE 3of9 Characer Set ***** do DEF_CODE39 ***** Get text to print and print barcode ***** stay = .T. do while stay ***** Create empty variable. The length is arbitrary as there is ***** ***** no defined maximum length of a 3of9 barcode. ***** message = space(25) @ 07,01 say [Enter text to print ] ; get m->MESSAGE ; picture '@K!' read if empty(m->MESSAGE) ***** exit on no message text stay = .F. loop endif ***** Prepend and append required asterik's to trimmed message ***** m->MESSAGE = "*"+trim(m->MESSAGE)+"*" set device to print ***** print barcoded m->MESSAGE ***** @ prow()+height,00 say barcode(m->MESSAGE) ***** Print message text below barcode ***** @ prow()+if(printer="L",height,0),int(len(m->MESSAGE)/4) say m->MESSAGE set device to screen ***** Check for page eject ***** ***** (necessary to see what you've done on a laserjet) ***** eject = .F. @ 08,01 say [Eject?] get eject picture [Y] read if eject eject endif enddo return ***** End of File CODE39 ***** ***************** *** *** Function: Barcode() *** Purpose: Creates Code39 barcode from character string *** Parameters: Character String *** Returns: String converted to barcode *** Notes: Requires the following variables: *** : *** : All printers: *** : nb = narrow bar character *** : wb = wide bar character *** : ns = narrow space *** : ws = wide space *** : *** : HP LaserJet: *** : start = Beginning cursor position adjustment *** : end = Ending cursor position adjustment *** : *** : Epson/IBM Printers: *** : height = height of barcode in lines *** : n1 & n2 = calculated dot graphics length *** : ***************** function barcode parameters m->MESSAGE code = "" do case case printer = "L" * read message character at a time and build barcode for i = 1 to len(m->MESSAGE) letter = substr(m->MESSAGE,i,1) code = code + if(at(letter,chars)=0,letter,char[at(letter,chars)]) + NS next code = start + code + end case printer = "E" for h = 1 to height for i = 1 to len(m->MESSAGE) letter = substr(m->MESSAGE,i,1) * build barcoded string code = if(at(letter,chars)=0,letter,char[at(letter,chars)]) + NS * print barcode character at a time on Epson printcode(esc + chr(76) + chr(N1) + chr(N2) + code) next * perform 23/216 line feed printcode(esc+chr(74)+chr(23)+chr(13)) next * perform 5/216 line feed printcode(esc+chr(74)+chr(5)+chr(13)) * reset printer to turn off graphics and reset to 10cpi printcode(esc+"@") endcase return code ***** End of Function(BARCODE) ***** ***************** *** *** Procedure: Setup_HP *** Purpose: Defines characters for HP LaserJet *** Parameters: None *** Returns: Initialized Public variables *** ***************** procedure setup_hp public nb,wb,ns,ws,start,end *** define bars and spaces for HP LaserJet II small_bar = 3 && number of points per bar wide_bar = round(small_bar * 2.25,0) && 2.25 x small_bar dpl = 50 && dots per line 300dpi/6lpi = 50dpl nb = esc+"*c"+transform(small_bar,'99')+"a"+alltrim(str(height*dpl))+"b0P"+esc+"*p+"+transform(small_bar,'99')+"X" wb = esc+"*c"+transform(wide_bar,'99')+"a"+alltrim(str(height*dpl))+"b0P"+esc+"*p+"+transform(wide_bar,'99')+"X" ns = esc+"*p+"+transform(small_bar,'99')+"X" ws = esc+"*p+"+transform(wide_bar,'99')+"X" *** adjust cusor position to start at top of line and return to bottom of line start = esc+"*p-50Y" end = esc+"*p+50Y" return ***** End of Procedure(SETUP_HP) ***** ***************** *** *** Procedure: Setup_Epson *** Purpose: Defines characters for Espon or IBM Graphics printer *** Parameters: None *** Returns: Initialized Public variables *** ***************** procedure setup_epson public nb,wb,ns,ws,n1,n2 ***** define Epson bars and spaces ns = chr(0) + chr(0) ws = chr(0) + chr(0) + chr(0) + chr(0) nb = chr(255) wb = chr(255) + chr(255) + chr(255) ***** set printer to 2/216 lines per inch printcode(esc+chr(51)+chr(2)) ***** calculate N1 and N2 values for dot graphics command cols = 21 N1 = cols % 256 && modulus N2 = INT(cols/256) return ***** End of Procedure(SETUP_EPSON) ***** ***************** *** *** Procedure: Def_Code39 *** Purpose: Define character set for CODE39 *** Parameters: None *** Returns: Initialized Public variables and array *** ***************** procedure def_code39 public char[44], chars chars = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%" CHAR[01] = WB+NS+NB+WS+NB+NS+NB+NS+WB && "1" CHAR[02] = NB+NS+WB+WS+NB+NS+NB+NS+WB && "2" CHAR[03] = WB+NS+WB+WS+NB+NS+NB+NS+NB && "3" CHAR[04] = NB+NS+NB+WS+WB+NS+NB+NS+WB && "4" CHAR[05] = WB+NS+NB+WS+WB+NS+NB+NS+NB && "5" CHAR[06] = NB+NS+WB+WS+WB+NS+NB+NS+NB && "6" CHAR[07] = NB+NS+NB+WS+NB+NS+WB+NS+WB && "7" CHAR[08] = WB+NS+NB+WS+NB+NS+WB+NS+NB && "8" CHAR[09] = NB+NS+WB+WS+NB+NS+WB+NS+NB && "9" CHAR[10] = NB+NS+NB+WS+WB+NS+WB+NS+NB && "0" CHAR[11] = WB+NS+NB+NS+NB+WS+NB+NS+WB && "A" CHAR[12] = NB+NS+WB+NS+NB+WS+NB+NS+WB && "B" CHAR[13] = WB+NS+WB+NS+NB+WS+NB+NS+NB && "C" CHAR[14] = NB+NS+NB+NS+WB+WS+NB+NS+WB && "D" CHAR[15] = WB+NS+NB+NS+WB+WS+NB+NS+NB && "E" CHAR[16] = NB+NS+WB+NS+WB+WS+NB+NS+NB && "F" CHAR[17] = NB+NS+NB+NS+NB+WS+WB+NS+WB && "G" CHAR[18] = WB+NS+NB+NS+NB+WS+WB+NS+NB && "H" CHAR[19] = NB+NS+WB+NS+NB+WS+WB+NS+NB && "I" CHAR[20] = NB+NS+NB+NS+WB+WS+WB+NS+NB && "J" CHAR[21] = WB+NS+NB+NS+NB+NS+NB+WS+WB && "K" CHAR[22] = NB+NS+WB+NS+NB+NS+NB+WS+WB && "L" CHAR[23] = WB+NS+WB+NS+NB+NS+NB+WS+NB && "M" CHAR[24] = NB+NS+NB+NS+WB+NS+NB+WS+WB && "N" CHAR[25] = WB+NS+NB+NS+WB+NS+NB+WS+NB && "O" CHAR[26] = NB+NS+WB+NS+WB+NS+NB+WS+NB && "P" CHAR[27] = NB+NS+NB+NS+NB+NS+WB+WS+WB && "Q" CHAR[28] = WB+NS+NB+NS+NB+NS+WB+WS+NB && "R" CHAR[29] = NB+NS+WB+NS+NB+NS+WB+WS+NB && "S" CHAR[30] = NB+NS+NB+NS+WB+NS+WB+WS+NB && "T" CHAR[31] = WB+WS+NB+NS+NB+NS+NB+NS+WB && "U" CHAR[32] = NB+WS+WB+NS+NB+NS+NB+NS+WB && "V" CHAR[33] = WB+WS+WB+NS+NB+NS+NB+NS+NB && "W" CHAR[34] = NB+WS+NB+NS+WB+NS+NB+NS+WB && "X" CHAR[35] = WB+WS+NB+NS+WB+NS+NB+NS+NB && "Y" CHAR[36] = NB+WS+WB+NS+WB+NS+NB+NS+NB && "Z" CHAR[37] = NB+WS+NB+NS+NB+NS+WB+NS+WB && "-" CHAR[38] = WB+WS+NB+NS+NB+NS+WB+NS+NB && "." CHAR[39] = NB+WS+WB+NS+NB+NS+WB+NS+NB && " " CHAR[40] = NB+WS+NB+NS+WB+NS+WB+NS+NB && "*" CHAR[41] = NB+WS+NB+WS+NB+WS+NB+NS+NB && "$" CHAR[42] = NB+WS+NB+WS+NB+NS+NB+WS+NB && "/" CHAR[43] = NB+WS+NB+NS+NB+WS+NB+WS+NB && "+" CHAR[44] = NB+NS+NB+WS+NB+WS+NB+WS+NB && "%" return ***** End of Procedure(DEF_CODE39) ***** ***************** *** *** Function: Printcode *** Purpose: Sends escape codes to printer *** Parameters: Character string or escape sequence *** Returns: Nothing *** ***************** function printcode parameters code set console off set print on ?? code set print off set console on return null ***** End of Function(PRINTCODE) ***** --------------------------------------------------------------------------- From: Robert L. Bailey <rlb@cs.odu.edu> There was a bar code printing program included on the disk with the first issue of PC Clones magazine. The program is copyrighted, but I have seen some of these on various bulletin boards. It was just called BARCODE.COM (maybe .EXE). If you can't find it, let me know. I'll see if I can find the disk and email it to you. --------------------------------------------------------------------------- From: bobc@attctc.Dallas.TX.US (Bob Calbridge) I can't vouch for this personally but I know of someone on one of our campuses that used an HP laser jet to generate bar code labels. From what he said, the bar code was, in fact, a font that had been downloaded into the machine then another program was used to print the labels. One caveat! Because labels can mess up a laser printer he actually printed the bar code on plain paper then used a copier to transfer them to the labels. --------------------------------------------------------------------------- From: davadam@cie.uoregon.edu If you are still looking for some way to produce bar codes, there is a pd laserfont for the Mac that is available-- it should be a simple matter to make your machine print out what you want in that font. I don't know where it is available elsewhere, but I saw it listed in the Educorp PD/Shareware catalog. Their number is 1-800-843-9497. --------------------------------------------------------------------------- From: Ron Crough <crough%hplrwc@hplabs.hp.com> This is a response to your note posted 8/1 looking for information regarding a bar code generator program. A program exists which is called the "BarCode Composer". It is a product costing $99.95 (US List Price) and it is offered by a company in Toronto, Canada: Delrina Technology Inc. 10 Brentcliffe Road, Suite 210, Toronto, Ontario, Canada M4G 3Y2 (416) 423-0456 As you might have guessed, it runs on an IBM PC platform. I have not used the program, but I currently have it on order. It supports 7 different types of bar codes. You should call these people and ask them to either fax or mail you a datasheet on the program.