[comp.lang.postscript] Printing Barcodes

bob@teda.UUCP (Bob Armstrong) (06/03/90)

  Can someone direct me to a font or program for printing code 39 (3 of 9)
barcodes ?  Postscript output is best, but I would take anything (maybe
Epson ?).

  Note that code39 is not the same as UPC barcodes (the ones you see in
grocery stores)...

Thanks,
Bob Armstrong
bob@teda.uucp {sun,decwrl,pyramid}!teda!bob

phillips@tegra.COM (Steve Phillips) (06/05/90)

In article <9208@teda.UUCP> bob@teda.UUCP (Bob Armstrong) writes:
>
>  Can someone direct me to a font or program for printing code 39 (3 of 9)
>barcodes ?  Postscript output is best, but I would take anything (maybe
>Epson ?).
>
>  Note that code39 is not the same as UPC barcodes (the ones you see in
>grocery stores)...
>
>Thanks,
>Bob Armstrong
>bob@teda.uucp {sun,decwrl,pyramid}!teda!bob

I believe that Adobe makes two PostScript fonts for barcodes, one for UPC and
one for Code 39.  You might want to check with your local Adobe font vendor.

good luck...

Steve
-- 
============================================================================
Steve Phillips                                         Tegra-Varityper, Inc.
tegra!phillips@uunet.com                               Billerica, MA
============================================================================

woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) (06/06/90)

In article <1004@io.tegra.COM>, phillips@tegra.COM (Steve Phillips) writes:
> In article <9208@teda.UUCP> bob@teda.UUCP (Bob Armstrong) writes:
> >
> >  Can someone direct me to a font or program for printing code 39 (3 of 9)
> >barcodes ?  Postscript output is best, but I would take anything (maybe
> >Epson ?).
> >
> >  Note that code39 is not the same as UPC barcodes (the ones you see in
> >grocery stores)...
> >

Here is a UPC barcode routine for what it is worth.
Please don't use it to create stick on barcodes for products down at your
local grocery store.  Besides being illegal , it is not nice to mess up
the inventory control by making the cash register record a 1 lb box of
something, when it is a 2 lb box.

%%
%%  Universal Product Code font
%%  Copyright (C) 1986 by Pipeline Associates, Inc.
%%  Permission is granted to use and distribute as long as this copyright
%%  notice remains intact and it is distributed free of charge.
%%
/UPCFontDict 8 dict def
/workdict 25 dict def
%% load up drawing procedures
workdict begin
/gray 0 def
/d1 
	{
	1.3 setlinewidth
	1 0 moveto 1 100 lineto stroke
	2 0 translate
	} bind def

/d2 
	{
	3.3 setlinewidth
	2 0 moveto 2 100 lineto stroke
	4 0 translate
	} bind def
/d3 
	{
	5.3 setlinewidth
	3 0 moveto 3 100 lineto stroke
	6 0 translate
	} bind def

/d4 
	{
	7.3 setlinewidth
	4 0 moveto 4 100 lineto stroke
	8 0 translate
	} bind def

/cline1 
	{
	1 gray sub setgray
	d1
	} bind def

/cline2 
	{
	1 gray sub setgray
	d2
	} bind def

/cline3 
	{
	1 gray sub setgray
	d3
	} bind def

/cline4 
	{
	1 gray sub setgray
	d4
	} bind def

/line1 
	{
	gray setgray
	d1
	} bind def

/line2 
	{
	gray setgray
	d2
	} bind def

/line3 
	{
	gray setgray
	d3
	} bind def

/line4 
	{
	gray setgray
	d4
	} bind def
end
/switch 
	{
	workdict begin 
		/gray 1 gray sub def 
		end
	} def

UPCFontDict begin
/FontType 3 def
/FontMatrix [.01 0 0 .015 0 0] def
/FontBBox [0 0 10 100] def
/Encoding 128 array def
/Widths 128 array def

%% fill the Encoding array with the procs to run for each character
0 1 127 
	{
	Encoding exch 
	/.notdef put
	} for
Encoding (0) 0 get /zero put
Encoding (1) 0 get /one put
Encoding (2) 0 get /two put
Encoding (3) 0 get /three put
Encoding (4) 0 get /four put
Encoding (5) 0 get /five put
Encoding (6) 0 get /six put
Encoding (7) 0 get /seven put
Encoding (8) 0 get /eight put
Encoding (9) 0 get /nine put
Encoding ( ) 0 get /space put
Encoding (|) 0 get /bar put

Widths (0) 0 get 14 put
Widths (1) 0 get 14 put
Widths (2) 0 get 14 put
Widths (3) 0 get 14 put
Widths (4) 0 get 14 put
Widths (5) 0 get 14 put
Widths (6) 0 get 14 put
Widths (7) 0 get 14 put
Widths (8) 0 get 14 put
Widths (9) 0 get 14 put
Widths ( ) 0 get 2 put
Widths (|) 0 get 2 put

%% define the procs
/CharProcs 20 dict def
CharProcs /.notdef {} put
CharProcs /zero 
	{
	cline3 line2 cline1 line1
	} put
CharProcs /one 
	{
	cline2 line2 cline2 line1
	} put
CharProcs /two 
	{
	cline2 line1 cline2 line2
	} put
CharProcs /three 
	{
	cline1 line4 cline1 line1
	} put
CharProcs /four 
	{
	cline1 line1 cline3 line2
	} put
CharProcs /five 
	{
	cline1 line2 cline3 line1
	} put
CharProcs /six 
	{
	cline1 line1 cline1 line4
	} put
CharProcs /seven 
	{
	cline1 line3 cline1 line2
	} put
CharProcs /eight 
	{
	cline1 line2 cline1 line3
	} put
CharProcs /nine 
	{
	cline3 line1 cline1 line2
	} put
CharProcs /space 
	{
	} put
CharProcs /bar 
	{
	line1
	} put
%% BuildChar is called by PS whenever a character is to be imaged out
%% of UPC
/BuildChar 
{
 workdict begin
  /char exch def
  /fontdict exch def
  /charname fontdict /Encoding get char get def
  /charproc fontdict /CharProcs get charname get def
  /charwidth fontdict /Widths get char get def
  charwidth 0 setcharwidth
  gsave
	charproc
  grestore
 end
} bind def
end
%% register font in postscript font machinery
/UPC UPCFontDict definefont pop

zwicky@sparkyfs.istc.sri.com (Elizabeth Zwicky) (06/08/90)

In article <1303@chinacat.Unicom.COM> woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) writes:
>> In article <9208@teda.UUCP> bob@teda.UUCP (Bob Armstrong) writes:
>> >  Note that code39 is not the same as UPC barcodes (the ones you see in
>> >grocery stores)...

>Here is a UPC barcode routine for what it is worth.
>Please don't use it to create stick on barcodes for products down at your
>local grocery store. 

Aside from the fact that he specifically stated that he didn't want a
UPC font, this doesn't look to me like it could possibly produce
readable UPC. UPC is not like Code-39; characters are not mapped
1-1 into sets of lines. There are 4 codes per character (right-even,
right-odd, left-even, and left-odd), not to mention start and stop
codes. Your supermarket reader is going to want not only a right
half with all rights and a left half with all lefts, but probably
also a check digit encoded by whether characters are printed even or
odd.  You're missing a bit over 75% of the necessary characters to
produce barcode that a reader will accept, plus the fact that without
the human readable and bars of various lengths it won't pass a
human...

	Elizabeth Zwicky.

jad@dayton.UUCP (J. Deters) (06/08/90)

> Article <1004@io.tegra.COM> From: phillips@tegra.COM (Steve Phillips)
>In article <9208@teda.UUCP> bob@teda.UUCP (Bob Armstrong) writes:
>>  Can someone direct me to a font or program for printing code 39 (3 of 9)
>>barcodes ?  Postscript output is best, but I would take anything (maybe
>>Epson ?).
>>Thanks,
>>Bob Armstrong
>>bob@teda.uucp {sun,decwrl,pyramid}!teda!bob
>I believe that Adobe makes two PostScript fonts for barcodes, one for UPC and
>one for Code 39.  You might want to check with your local Adobe font vendor.
>
>Steve Phillips                                         Tegra-Varityper, Inc.
>tegra!phillips@uunet.com                               Billerica, MA

Or, your local net.denizens may have written their own fonts.  You just
never know... :-)

Anyway, I wrote the following a few years back.  We're now basing an
entire inventory on it, so it darn well better work!  But, see the
disclaimer included anyway...
-----8<-----Cut Here-----8<-----Cut Here-----8<-----Cut Here-----
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	README
#	3of9
# This archive created: Thu Jun  7 13:52:14 1990
# By:	J. Deters (Terrapin Transit Authority)
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'README'
then
	echo shar: "will not over-write existing file 'README'"
else
cat << \SHAR_EOF > 'README'
This is a PostScript prolog that will generate a 3 of 9 barcode font.
I wrote it a few years ago after seeing something similar posted
for UPC codes by Pipeline Associates.  (This is completely different
code, however.)  It allows full ASCII text (lower case is translated
into upper case -- there are no lower case 3 of 9 codes.

Also enclosed is a small shell script that will wrap your text up
in asterisks, append the prolog, and print the barcode on the page.
If you want to truly conform to MIL-STD-1189A (4 SEPTEMBER 1984),
Military Standard Department of Defense Bar Code Symbology (SDS), you'll
have to code for it appropriately (my sample doesn't fit all their
wonderful dimensions).

  Character density:  9.4 CPI to 3.0 CPI
  Minimum nominal unit size (thin bar):  .0075 inch
  Maximum nominal unit size (thin bar):  .0400 inch
  Nominal wide to narrow ratio:  2.2:1 to 3.0:1 for codes whose
                                 unit size is less than .015 inch
                                 2.0:1 to 3.0:1 for codes whose
                                 unit size is equal to or more than
                                 .015 inch
  Minimum bar height:  .25 inch
  Density range    Minimum height    Maximum height
  1.7<=CPI<3.0     .75               1.25
  3.0<=CPI<6.5     .375              .875
  6.5<=CPI<9.4     .25               .5
  Intercharacter gap:  The minimum gap is the same as the minimum
  dimension of a narrow element.  The maximum gap shall be no more
  than three times the width of a narrow element.
  Margins (quiet zones):  The minimum left and right margins shall
  be 10 times the width of one narrow element or .25 inch (whichever
  is greater).
  Human-readable interpretation (HRI):  The HRI shall represent only
  the encoded characters, and start and stop asterisks shall be
  suppressed.  It is not intended to be machine readable.  The HRI
  is to be printed in an easily readable font, and are to be a
  minimum of .094 inch in height.  The HRI shall be printed above
  or preferably below the bar code.
  Spacing between bar code and HRI:  Minimum of .1 inch, max of .25 inch.
  Spacing between edge of label and HRI:  Minimum .0625 inch
  Spacing between SDS messages (vertical):  Min .375 inch, max .75 inch.
  Spacing between SDS messages (horiz.):  Min .5 inch
  Maximum number of encoded characters:  30 data, 32 including start and
  stop characters, and other control characters that may be used.

There is a bunch of other stuff in this MIL-SPEC pertaining to opacity,
reflectivity, tolerances, and spots and voids that probably won't
affect anyone using a 300dpi printer with black ink.

DISCLAIMER:  I am not responsible.  Just ask my boss.  This code is
provided AS IS, and I make no warranties about its fitness for a
particular purpose.  If you use this code and it doesn't work for you,
tough.  I can't be held responsible for any damages for your using this
code.  How's that for a nasty thing to have to say?
SHAR_EOF
fi
if test -f '3of9'
then
	echo shar: "will not over-write existing file '3of9'"
else
cat << \SHAR_EOF > '3of9'
%
%  3 of 9 font.  Copyright (C) 1989, John Deters.  All rights reserved.
%  Permission is hereby granted to freely use this software in any
%  application, commercial or otherwise, as long as this notice is preserved,
%  and as long as this portion of the software remains freely redistributable.
%
/3of9FontDict 55 dict def
/workdict 55 dict def 
% load up drawing procedures
workdict begin
	/sp1 {
		1 setgray
		2 setlinewidth
		1 0 moveto 1 75 lineto stroke
		2 0 translate
	} bind def
	/sp2 {
		1 setgray
		5 setlinewidth
		2.5 0 moveto 2.5 75 lineto stroke
		5 0 translate
	} bind def
	/mk1 {
		0 setgray
		2 setlinewidth
		1 0 moveto 1 75 lineto stroke
		2 0 translate
	} bind def
	/mk2 {
		0 setgray
		5 setlinewidth
		2.5 0 moveto 2.5 75 lineto stroke
		5 0 translate
	} bind def
end

3of9FontDict begin
/FontType 3 def
/FontMatrix [.01 0 0 .01 0 0] def
/FontBBox [0 0 10 100] def
/Encoding 128 array def
/Widths 128 array def

% Put the proc names of each character in the array 'Encoding'
0 1 127 {Encoding exch /.notdef put} for
Encoding (1) 0 get /one put
Encoding (2) 0 get /two put
Encoding (3) 0 get /three put
Encoding (4) 0 get /four put
Encoding (5) 0 get /five put
Encoding (6) 0 get /six put
Encoding (7) 0 get /seven put
Encoding (8) 0 get /eight put
Encoding (9) 0 get /nine put
Encoding (0) 0 get /zero put
Encoding (A) 0 get /leta put
Encoding (B) 0 get /letb put
Encoding (C) 0 get /letc put
Encoding (D) 0 get /letd put
Encoding (E) 0 get /lete put
Encoding (F) 0 get /letf put
Encoding (G) 0 get /letg put
Encoding (H) 0 get /leth put
Encoding (I) 0 get /leti put
Encoding (J) 0 get /letj put
Encoding (K) 0 get /letk put
Encoding (L) 0 get /letl put
Encoding (M) 0 get /letm put
Encoding (N) 0 get /letn put
Encoding (O) 0 get /leto put
Encoding (P) 0 get /letp put
Encoding (Q) 0 get /letq put
Encoding (R) 0 get /letr put
Encoding (S) 0 get /lets put
Encoding (T) 0 get /lett put
Encoding (U) 0 get /letu put
Encoding (V) 0 get /letv put
Encoding (W) 0 get /letw put
Encoding (X) 0 get /letx put
Encoding (Y) 0 get /lety put
Encoding (Z) 0 get /letz put
Encoding (a) 0 get /leta put
Encoding (b) 0 get /letb put
Encoding (c) 0 get /letc put
Encoding (d) 0 get /letd put
Encoding (e) 0 get /lete put
Encoding (f) 0 get /letf put
Encoding (g) 0 get /letg put
Encoding (h) 0 get /leth put
Encoding (i) 0 get /leti put
Encoding (j) 0 get /letj put
Encoding (k) 0 get /letk put
Encoding (l) 0 get /letl put
Encoding (m) 0 get /letm put
Encoding (n) 0 get /letn put
Encoding (o) 0 get /leto put
Encoding (p) 0 get /letp put
Encoding (q) 0 get /letq put
Encoding (r) 0 get /letr put
Encoding (s) 0 get /lets put
Encoding (t) 0 get /lett put
Encoding (u) 0 get /letu put
Encoding (v) 0 get /letv put
Encoding (w) 0 get /letw put
Encoding (x) 0 get /letx put
Encoding (y) 0 get /lety put
Encoding (z) 0 get /letz put
Encoding (-) 0 get /dash put
Encoding (.) 0 get /period put
Encoding ( ) 0 get /space put
Encoding (*) 0 get /star put
Encoding ($) 0 get /dollar put
Encoding (/) 0 get /slash put
Encoding (+) 0 get /plus put
Encoding (%) 0 get /percent put
Encoding (|) 0 get /bar put

Widths (1) 0 get 29 put
Widths (2) 0 get 29 put
Widths (3) 0 get 29 put
Widths (4) 0 get 29 put
Widths (5) 0 get 29 put
Widths (6) 0 get 29 put
Widths (7) 0 get 29 put
Widths (8) 0 get 29 put
Widths (9) 0 get 29 put
Widths (0) 0 get 29 put
Widths (A) 0 get 29 put
Widths (B) 0 get 29 put
Widths (C) 0 get 29 put
Widths (D) 0 get 29 put
Widths (E) 0 get 29 put
Widths (F) 0 get 29 put
Widths (G) 0 get 29 put
Widths (H) 0 get 29 put
Widths (I) 0 get 29 put
Widths (J) 0 get 29 put
Widths (K) 0 get 29 put
Widths (L) 0 get 29 put
Widths (M) 0 get 29 put
Widths (N) 0 get 29 put
Widths (O) 0 get 29 put
Widths (P) 0 get 29 put
Widths (Q) 0 get 29 put
Widths (R) 0 get 29 put
Widths (S) 0 get 29 put
Widths (T) 0 get 29 put
Widths (U) 0 get 29 put
Widths (V) 0 get 29 put
Widths (W) 0 get 29 put
Widths (X) 0 get 29 put
Widths (Y) 0 get 29 put
Widths (Z) 0 get 29 put
Widths (a) 0 get 29 put
Widths (b) 0 get 29 put
Widths (c) 0 get 29 put
Widths (d) 0 get 29 put
Widths (e) 0 get 29 put
Widths (f) 0 get 29 put
Widths (g) 0 get 29 put
Widths (h) 0 get 29 put
Widths (i) 0 get 29 put
Widths (j) 0 get 29 put
Widths (k) 0 get 29 put
Widths (l) 0 get 29 put
Widths (m) 0 get 29 put
Widths (n) 0 get 29 put
Widths (o) 0 get 29 put
Widths (p) 0 get 29 put
Widths (q) 0 get 29 put
Widths (r) 0 get 29 put
Widths (s) 0 get 29 put
Widths (t) 0 get 29 put
Widths (u) 0 get 29 put
Widths (v) 0 get 29 put
Widths (w) 0 get 29 put
Widths (x) 0 get 29 put
Widths (y) 0 get 29 put
Widths (z) 0 get 29 put
Widths (-) 0 get 29 put
Widths (.) 0 get 29 put
Widths ( ) 0 get 29 put
Widths (*) 0 get 29 put
Widths ($) 0 get 29 put
Widths (/) 0 get 29 put
Widths (+) 0 get 29 put
Widths (%) 0 get 29 put
Widths (|) 0 get 4 put

% define each letter in bar code
/CharProcs 55 dict def
CharProcs /.notdef	{} put
CharProcs /one		{ mk2 sp1 mk1 sp2 mk1 sp1 mk1 sp1 mk2 sp1 } put
CharProcs /two		{ mk1 sp1 mk2 sp2 mk1 sp1 mk1 sp1 mk2 sp1 } put
CharProcs /three	{ mk2 sp1 mk2 sp2 mk1 sp1 mk1 sp1 mk1 sp1 } put
CharProcs /four		{ mk1 sp1 mk1 sp2 mk2 sp1 mk1 sp1 mk2 sp1 } put
CharProcs /five		{ mk2 sp1 mk1 sp2 mk2 sp1 mk1 sp1 mk1 sp1 } put
CharProcs /six		{ mk1 sp1 mk2 sp2 mk2 sp1 mk1 sp1 mk1 sp1 } put
CharProcs /seven	{ mk1 sp1 mk1 sp2 mk1 sp1 mk2 sp1 mk2 sp1 } put
CharProcs /eight	{ mk2 sp1 mk1 sp2 mk1 sp1 mk2 sp1 mk1 sp1 } put
CharProcs /nine		{ mk1 sp1 mk2 sp2 mk1 sp1 mk2 sp1 mk1 sp1 } put
CharProcs /zero		{ mk1 sp1 mk1 sp2 mk2 sp1 mk2 sp1 mk1 sp1 } put
CharProcs /leta		{ mk2 sp1 mk1 sp1 mk1 sp2 mk1 sp1 mk2 sp1 } put
CharProcs /letb		{ mk1 sp1 mk2 sp1 mk1 sp2 mk1 sp1 mk2 sp1 } put
CharProcs /letc		{ mk2 sp1 mk2 sp1 mk1 sp2 mk1 sp1 mk1 sp1 } put
CharProcs /letd		{ mk1 sp1 mk1 sp1 mk2 sp2 mk1 sp1 mk2 sp1 } put
CharProcs /lete		{ mk2 sp1 mk1 sp1 mk2 sp2 mk1 sp1 mk1 sp1 } put
CharProcs /letf		{ mk1 sp1 mk2 sp1 mk2 sp2 mk1 sp1 mk1 sp1 } put
CharProcs /letg		{ mk1 sp1 mk1 sp1 mk1 sp2 mk2 sp1 mk2 sp1 } put
CharProcs /leth		{ mk2 sp1 mk1 sp1 mk1 sp2 mk2 sp1 mk1 sp1 } put
CharProcs /leti		{ mk1 sp1 mk2 sp1 mk1 sp2 mk2 sp1 mk1 sp1 } put
CharProcs /letj		{ mk1 sp1 mk1 sp1 mk2 sp2 mk2 sp1 mk1 sp1 } put
CharProcs /letk		{ mk2 sp1 mk1 sp1 mk1 sp1 mk1 sp2 mk2 sp1 } put
CharProcs /letl		{ mk1 sp1 mk2 sp1 mk1 sp1 mk1 sp2 mk2 sp1 } put
CharProcs /letm		{ mk2 sp1 mk2 sp1 mk1 sp1 mk1 sp2 mk1 sp1 } put
CharProcs /letn		{ mk1 sp1 mk1 sp1 mk2 sp1 mk1 sp2 mk2 sp1 } put
CharProcs /leto		{ mk2 sp1 mk1 sp1 mk2 sp1 mk1 sp2 mk1 sp1 } put
CharProcs /letp		{ mk1 sp1 mk2 sp1 mk2 sp1 mk1 sp2 mk1 sp1 } put
CharProcs /letq		{ mk1 sp1 mk1 sp1 mk1 sp1 mk2 sp2 mk2 sp1 } put
CharProcs /letr		{ mk2 sp1 mk1 sp1 mk1 sp1 mk2 sp2 mk1 sp1 } put
CharProcs /lets		{ mk1 sp1 mk2 sp1 mk1 sp1 mk2 sp2 mk1 sp1 } put
CharProcs /lett		{ mk1 sp1 mk1 sp1 mk2 sp1 mk2 sp2 mk1 sp1 } put
CharProcs /letu		{ mk2 sp2 mk1 sp1 mk1 sp1 mk1 sp1 mk2 sp1 } put
CharProcs /letv		{ mk1 sp2 mk2 sp1 mk1 sp1 mk1 sp1 mk2 sp1 } put
CharProcs /letw		{ mk2 sp2 mk2 sp1 mk1 sp1 mk1 sp1 mk1 sp1 } put
CharProcs /letx		{ mk1 sp2 mk1 sp1 mk2 sp1 mk1 sp1 mk2 sp1 } put
CharProcs /lety		{ mk2 sp2 mk1 sp1 mk2 sp1 mk1 sp1 mk1 sp1 } put
CharProcs /letz		{ mk1 sp2 mk2 sp1 mk2 sp1 mk1 sp1 mk1 sp1 } put
CharProcs /dash		{ mk1 sp2 mk1 sp1 mk1 sp1 mk2 sp1 mk2 sp1 } put
CharProcs /period	{ mk2 sp2 mk1 sp1 mk1 sp1 mk2 sp1 mk1 sp1 } put
CharProcs /space	{ mk1 sp2 mk2 sp1 mk1 sp1 mk2 sp1 mk1 sp1 } put
CharProcs /star		{ mk1 sp2 mk1 sp1 mk2 sp1 mk2 sp1 mk1 sp1 } put
CharProcs /dollar	{ mk1 sp2 mk1 sp2 mk1 sp2 mk1 sp1 mk1 sp1 } put
CharProcs /slash	{ mk1 sp2 mk1 sp2 mk1 sp1 mk1 sp2 mk1 sp1 } put
CharProcs /plus		{ mk1 sp2 mk1 sp1 mk1 sp2 mk1 sp2 mk1 sp1 } put
CharProcs /percent	{ mk1 sp1 mk1 sp2 mk1 sp2 mk1 sp2 mk1 sp1 } put
CharProcs /bar		{ mk1 sp1 } put
% PostScript will call BuildChar for each character printed in 3of9.
/BuildChar {
	workdict begin
		/char exch def
		/fontdict exch def
		/charname fontdict /Encoding get char get def
		/charproc fontdict /CharProcs get charname get def
 		/charwidth fontdict /Widths get char get def
		charwidth 0 setcharwidth
		gsave
			charproc
 		grestore
	end
} bind def
end
/3of9 3of9FontDict definefont pop
%
% 3of9 is now loaded in the printer and can be used like any other font.
% Don't forget that you must include the stars at both ends of the text.
% Also, you must print out the human readable text beneath the bar code,
% if you wish to conform to MIL-STD-1189A (suppress the asterisks).
%
/3of9 findfont 30 scalefont setfont
72 72 translate
0 0 moveto
(*1234567890180100*) show
showpage
SHAR_EOF
fi
exit 0
#	End of shell archive
-- 
J. Deters                                      +---------+
INTERNET:  jad@dayton.DHDSC.MN.ORG             | S H * T |
UUCP:  ...!bungia!dayton!jad                   +---------+
ICBM:  44^58'36"N by 93^16'12"W       "Vanna, I'd like to buy a vowel."

amanda@mermaid.intercon.com (Amanda Walker) (06/08/90)

One thing that no one has mentioned so far is that you can get in trouble
by printing barcode on a 300 dpi printer for anything but your own internal
use, unless you really know what you are doing.  Most barcode symblogies
are designed to withstand printing glitches and other distortions, but it
is a lot harder to produce barcodes that are actually in spec than it is
to just produces ones that scan OK most of the time.  For internal inventory
purposes, it's up to you to decide whether or not it's worth worrying about.
However, if you are making things like UPC codes for retail packaging or
LOGMARS labels for DoD shipments, you should bear some things in mind:

 - UPC cannot be printed in spec on a 300 dpi printer.  At the standard
   symbol sizes, you need to be able to control the bar widths more finely
   than 1/300th of an inch.  Something like a LaserMax or other "super
   resolution" printer may work, though, since it's a question of positioning
   accuracy, not resolution.

   Now, you can print *scannable* UPC & EAN (which is the European extension
   of UPC) symbols on anything down to a 72 dpi printer, which has proven
   useful for one-shot symbols such as weigh-it-yourself produce labels.
   For retail packaging, though, you should probably typeset it to be safe.

 - Most other codes are only in spec at specific sizes for a particular
   resolution, and at high resolutions you need to take the printer
   marking characteristics into account.  For example, a high-density Code
   39 symbol may be in spec on a write-black printer, but the same set of
   pixels on a write-white printer will be way out of spec.

 - Toner smear can quickly render a barcode symbol unscannable.  If you are
   using a wand-type scanner, covering symbols with clear labels will
   greatly prolong their useful lives and save a lot of aggravation.

For anyone doing serious work with barcodes, I suggest getting copies of
the USD (Uniform Symbol Description) series of documents from AIM (Automatic
Indentification Manufacturers), an automatic-ID technology clearinghouse.
I don't have their address handy, but I can dig it up if anyone needs it.

--
Amanda Walker, InterCon Systems Corporation
--
Entropy requires no maintenance.