Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Zebra ZPL barcode language and VFP

394 views
Skip to first unread message

John Gundrum

unread,
Jan 8, 2001, 7:50:22 AM1/8/01
to
We are trying to print barcodes using a Zebra barcode printer using the ZPL
programming language.

Is there a way to use a standard label form and use ZPL to print these
barcodes.

Typically how this is done using the ZPL language is you send the printer
control codes to the printer (similar to PS and HP PCL). But all we've been
able to do to make this work, is send the printer control codes directly to
the printer through DOS. We have to create a text file and then sent it to
the printer from DOS by doing a "COPY text.txt > LPT1" which is far from
practical. We would like to do this from within a label form.

Any ideas how? How do you send printer commands to a printer through a
label form (or report form)???

Thanks,
John G.

Aaron Clark

unread,
Jan 8, 2001, 9:23:31 AM1/8/01
to
First you need to add a new printer in windows using the Generic/Test
Only driver. Then create a label and send ZPL commands to the printer
using field elements with the code in quotations.

sergio

unread,
Jan 9, 2001, 11:15:47 AM1/9/01
to

> Typically how this is done using the ZPL language is you send the printer
> control codes to the printer (similar to PS and HP PCL). But all we've
been
> able to do to make this work, is send the printer control codes directly
to
> the printer through DOS. We have to create a text file and then sent it
to
> the printer from DOS by doing a "COPY text.txt > LPT1" which is far from

you can use the command:
file_text=text.txt
! command /ctype &file_text >prn

in this way u can print direct from vfp6

Sergio MArchi


Marc Bernier

unread,
Jan 10, 2001, 4:50:39 PM1/10/01
to

I have had this problem with ZPL. It's pretty much true for most barcode
printers, as they all seem to have similar 'languages'. This was several
years ago, in Fox 2.6 (which the customer is still using).

I never was successful in using a label or a report to do my printing,
mainly because neither delivers x/y position information to the printer. The
label and report forms drive x/y positioning through spaces and tabs (for x)
and cr/lf (for y).

What I ended up doing was writing a little 'driver', which consisted of a
set of functions - reset, line, text, barcode, etc. Each function would take
an appropriate set of arguments (for example (x1,y1,x2,y2) for the line
function). The functions were coded to output (using ???) the appropriate
ZPL strings. To print out a particular label, you could string together the
set of functions needed to do the job.

I took this a couple steps further by making several sets of 'driver'
functions, which set was used was determined by the operator at run time (we
had some non-ZPL printers, also).

Finally, rather than having to code and compile a program to make a label, I
created a little database that contained a list of commands and parameters,
and made a little universal processor that would pass a database and call
the appropriate functions (from the desired driver). This was done because
we have several customers who require differing barcode formats (the joy of
EDI).

At one point, I had written a C++ Windows program that was a sort of WYSWYG
way of building and modifying the databases. But the Windows program only
gets you close (there were concessions...), so the majority of my label
tweaking is accomplished through trial and error with the database.

Marc


0 new messages