Dec 092017
 
Will print Bar Codes on Epson or other dot matrix printer. Includes complete TP3.0+ source code.
File BRCODE30.ZIP from The Programmer’s Corner in
Category Printer Utilities
Will print Bar Codes on Epson or other dot matrix printer. Includes complete TP3.0+ source code.
File Name File Size Zip Size Zip Type
BARCODE.CNF 17 17 stored
BARCODE.DAT 53 49 deflated
BARCODE.HLP 2377 1041 deflated
NEWBAR.COM 24475 15659 deflated
NEWBAR.DOC 8192 3283 deflated
NEWBAR.PAS 21890 5063 deflated

Download File BRCODE30.ZIP Here

Contents of the NEWBAR.DOC file





N E W B A R Ver. 1.0
a public domain barcode utility
by Dale McPherson

This program permits '3 of 9' barcode printing
using the graphics capabilities of IBM graphics or EPSON
compatible dot matrix printers. It is configured to
convert and render in barcode a string of up to 23
characters, and the source code can easily be modified
to print more characters, if desired. This type of
barcode accepts only upper case letters, numbers, and
simple punctuation ( -, ., , *, $, /, +, %). The
program will also accept lower case letters and automatic-
ally convert them to upper case before printing.

NEWBAR will run on IBM PC compatibles with 256K of
memory or greater. It has been tested on MGA, CGA, EGA,
and Hercules graphics boards on both color and mono-
chrome monitors.

This software, along with the Turbo Pascal source
code, is being placed in the public domain. You may
feel free to modify as you wish, but I would appreciate
a copy of any significant modifications for my personal
interest. The following files should be present:

NEWBAR.COM - the executable program
BARCODE.DAT - a small sample text file to be
printed
NEWBAR.DOC - this documentation file
BARCODE.HLP - an online help file
BARCODE.CNF - a configuration file for print
parameters
NEWBAR.PAS - the Turbo Pascal source code



GETTING STARTED >>>>

1. Running the Program:

NEWBAR may be run from any disk or subdirectory.
However, it expects to find the supporting configuration
file and help file in the logged directory. To print the
documentation file, just type the command:

COPY NEWBAR.DOC PRN

2. The Menu:

The opening menu utilizes a moving light bar to make
selections. Just use the up or down cursor keys to point




to the selection and hit RETURN to execute it. On a mono-
chrome monitor (MDA or Hercules), the option being pointed
out will be in dim video while the rest of the options will
be in bright video. The program options follow:

A. Print BARCODE from the keyboard - A string of up
to 23 characters may be entered from the keyboard. The
string will be printed in barcode, accompanied by a plain
language print-out (legend) of the string. The printing
from keyboard or disk file will utilize the print parame-
ters displayed on the right side of the screen.

B. Print BARCODE from a disk file - Successive lines of
barcode will be printed from an ASCII text file which
has each string separated by a carriage return/line
feed. To construct such a file, use an ASCII text
editor such as SideKick, the non-document mode of
WordStar, or you favorite text editor. The default
name for a barcode file is BARCODE.DAT, but the pro-
gram permits entry of any file name. A sample file
called BARCODE.DAT is provided as an example.
Additionally, the name of a text file may be entered
as a command line parameter. For example, typing
NEWBAR MYFILE at the DOS prompt will cause NEWBAR
to print a barcode file named MYFILE and then ter-
minate. The printout may be terminated at any time by
hitting Escape.

C. Edit Printing Parameters - Printing parameters are
contained in a configuration file. Each of the param-
eters may be edited, and the new edited parameters may
then be saved in place of the supplied configuration.
To edit parameters, press RETURN with the light bar
on the Edit Parameters option. When prompted for the
parameter to edit, press the first letter (high-
lighted) of the desired parameter, e.g., to edit
HEIGHT, press H and then supply the desired numerical
value. If no change is desired, simply press RETURN.
To restore the default values, press Escape.

*** NOTE ***

Please do not try to modify the printing parameter
file manually with a text editor. The program can han-
dle the absence of the BARCODE.CNF file, but can't deal
with a corrupted version of the file.

The user adjustable parameters are as follows:

Height - Height in lines of the barcode. Each line is
approximately 8/72 inch high on IBM compatible printers.

Margin - The left margin for barcode printing...the num-
ber of blank spaces printed to the left of the barcode.




Length - Controls page length with extra lines. On IBM
compatible printers each additional linefeed is 2/72".

Width - Printed width of barcode elements in dots

Copies - Number of Barcode copies for each input.

Printer - selectable for IBM or EPS (Epson). This
parameter controls the total linefeed increment for
pass. IBM graphics compatible printers usually micro-
space in increments of 1/216 inch while EPSON compat-
bles use micro-space increments of 1/144 inch. The
height of eight dots is 1/9 inch high, so the line
feed is adjusted to nine lines per inch during the
actual barcode printing.

Bold - "ON" = 120 dots/inch; "OFF" = 60 dots/inch.
This is the dot density used in printing the barcode
symbols.

Note: When using bold print, the barcode elements
are one - half as wide, and it may be desirable to in-
crease the Width.

3. Confessions of a part-time programmer...

The MARGIN, WIDTH, and COPIES parameters are reasonably
self explanatory. The HEIGHT, LENGTH, and ADVANCE parameters
merit some explanation. When I started this program, I wanted
precise control over the linear space used by incremental
line feeds so that the user could easily specify the re-
sulting form length. What I found out after performing
tests on a number of IBM/EPSON "compatible" dot matrix
printers is that the actual distance moved in an incre-
mental line feed varies from printer to printer even
though all of them respond to the same escape sequences.
The advertised increment in a given printer's manual may
be 1/144, 1/180, 1/216 or 1/240 inch, but the actual
space moved is anybody's guess. The HEIGHT parameter
specifies the number of 8 pin wide passes used for the
actual barcode printing. On most printers, each pass uses
about 1/9 (8/72) of inch. The ADVANCE parameter controls
the movement during each of the barcode passes. There are
two movements, actually, one carriage advance of two dots,
and a subsequent advance sufficient to start the process over




on the next pass. The default parameters will provide a form
length of 1-1/2 inches on IBM compatible printers, which is a
common length for mailing labels. If you encounter white
space between successive barcode during the barcode printing,
you are probably using the IBM setting on an Epson printer.
If, on the other hand, the passes seem to overlap execessively,
you are probably using the EPS setting on an IBM compatible
printer.

The BOLD parameter causes a dot graphics density of 120
dots per inch when ON and 60 dots per inch when OFF. The
bars and spaces use a fixed number of dot columns, so they
will be half as wide when BOLD is ON. To restore bar and
space widths with BOLD ON to the same appearance as with
BOLD OFF, simply double the width parameter.

I started writing this program as an interesting exercise. If
you find it useful and would like to see additional features
(or stop seeing inadvertant bugs) please send me your sug-
testions.

Dale McPherson
(804) 444-8416
2029 Elbow Road
Chesapeake, Va. 23320
6/26/87



 December 9, 2017  Add comments

Leave a Reply