[Info-vax] how to display bar code label on a session from a "text"

MetaEd metaed at gmail.com
Thu Aug 20 13:21:30 EDT 2009


On Aug 20, 11:25 am, ed_lin <ed_sushien_... at yahoo.com> wrote:
> does any one know how
> to translate a 'given' text string to bar code label on the vt
> emulated screen?

I can get you part way there.

Supposing you can control the Windows font used by your terminal
emulator, you can install a free UPC-A font, which is commonly known
as Chaos Microsystems UPCA.TTF and is available at various download
sites. Translate your 12 digit code to font codes as follows.

- The Number System glyphs 0–9 are at 80 (0x50) to 89 (0x59) and
include the Left Guard
- The Manufacturer glyphs 0–9 are at 48 (0x30) to 59 (0x39)
- The Center Guard glyph is at 112 (0x70)
- The Product glyphs 0–9 are at 64 (0x40) to 73 (0x49)
- The Check Digit glyphs are at 96 (0x60) to 105 (0x69) and include
the Right Guard

I implemented this code translation as a Google Spreadsheet formula,
reproduced below, using $K15 to represent the inventory control code.
I have added newlines to improve readability.

=CHAR(80+MID($K15,1,1))
&CHAR(48+MID($K15,2,1))
&CHAR(48+MID($K15,3,1))
&CHAR(48+MID($K15,4,1))
&CHAR(48+MID($K15,5,1))
&CHAR(48+MID($K15,6,1))
&CHAR(112)
&CHAR(64+MID($K15,7,1))
&CHAR(64+MID($K15,8,1))
&CHAR(64+MID($K15,9,1))
&CHAR(64+MID($K15,10,1))
&CHAR(64+MID($K15,11,1))
&CHAR(96+MID($K15,12,1))

For example, one of our private inventory control codes is
400000310145. The formula translates this to font codes T00000pCA at ADe.
This string, using the Chaos Microsystems UPC-A font, displays as the
UPC-A barcode.

Best wishes,

Edward
--
Sometimes they fool you by walking upright.



More information about the Info-vax mailing list