HP3000-L Archives

August 2006, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"James B. Byrne" <[log in to unmask]>
Reply To:
James B. Byrne
Date:
Tue, 1 Aug 2006 09:52:40 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (74 lines)
On Tuesday, 1 August 2006 3:47 AM, Chris Slabe wrote:
>
> OK... I've read tons and tons of articles and need some information on how
> to generate and print barcodes directly from our HP3000 to a HP Laserjet
> printer or using a PostScript method. Does anyone have information that
> would help me get started?
>

We have been printing 3of9 barcodes on various direct-connect serial and
latterly Ethernet dot-matrix (impact and laser) printers connected to HP3000s
since 1984.  Each printer's setup string may be somewhat different of course,
but for our HP LaserJets (series II, III, 4, 5, and 2100 series) we have
successfully used a soft-font resident on the HP3000 that is downloaded as
part of the printer initialization for the print job.

Many, many years ago we accomplished this with native HP commands, but I no
longer remember how this was done as in about 1990 we switched to Fantasia to
handle this complexity for us.  Nonetheless, we continued to use the same soft
font thereafter and still do to this day rather than have the LaserJets
generate them. We originally did this because we had problems with some models
not being able to produce entire sheets of barcodes natively whereas with the
soft font they had no problem.  This is probably no longer an issue given the
memory and processor power in late model printers.  However, the use of the
soft font does allow a certain degree of device independence in our program
code, but not a lot.

If you uses a soft font then all you need pass to the printer is the HT and VT
offset, the height of the code and the string to encode (remember to include
the start and stop characters as part of the string) all encapsulate in a
character escape sequence.  As an example (taken from a PowerHouse QUIZ
program):

...
DEFINE QZD-ESC-I INTEGER SIZE 2 = 27
DEFINE QZD-ESC-C CHARACTER SIZE 1 = (CHARACTERS(QZD-ESC-I))[2:1]

DEFINE QZD-BC-FMT CHARACTER SIZE 45 =                              &
    QZD-ESC-C + "*z0v0q3.5r1.5s3.5t1.5u0h41c<" +                   &
    ENTRY-CTRL-NO OF ENTRY-HEADER + ">Z"                           &
      IF QZD-PRINTER EQ "HPLJ"                                     &
...


This code defines the escape character in terms that QUIZ can use and builds a
string with the encoded data sandwiched between the printer commands and
inserts the start and stop characters for the barcode itself.  We do a similar
thing for the Horizontal and Vertical Tabs to position the Barcode on the
page. For example:

...
DEFINE QZD-HT-I INTEGER SIZE 2 = 9
DEFINE QZD-HT-C CHARACTER SIZE 1 = (CHARACTERS(QZD-HT-I))[2:1]
...

This allows us to simply put the barcodes onto the page wherever we like and
yet still retain the conceptual simplicity of a line-printer page layout for
the report programs since their line and space indexing is not affected at all
by this printer control code legerdemain.

Regards,
Jim


--
***     e-mail is NOT a secure channel     ***
James B. Byrne                mailto:ByrneJB.<token>@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3CE               delivery <token> = hal

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2