Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zebra Thermal Printers

Status
Not open for further replies.

ti3863

IS-IT--Management
Mar 19, 2003
1
0
0
US
I have a barcode software that I used to print data to a file to catch the commands the printer was printer. I'm trying to print to a Eltron/Zebra Thermal Parallell Printer using EPL2 Programmers Manual.

The commands are:

OD
JF
S8
D10
q800
Q1200,24

N
GW320,279,22,2
P1

I used the put command but it's not taking the commands. It prints the commands. Below is the format I'm using to print to my parallel thermal printer.

put STREAM PSHR-STRM2 control "OD" + CHR(13) + chr(10).
put STREAM PSHR-STRM2 control "JF" + CHR(13) + chr(10).
put STREAM PSHR-STRM2 control "S6" + CHR(13) + chr(10).
put STREAM PSHR-STRM2 control "D10" + CHR(13) + chr(10).
put STREAM PSHR-STRM2 control "q800" + CHR(13) + chr(10).
put STREAM PSHR-STRM2 control "Q1200,24" + CHR(13) + chr(10).
 
I had to climb into the "way back machine" to resurrect this code, so bear with me. It is part of a program I wrote to create barcoded packaging labels on Zebra Z105 printers connected to a Unix (AIX) host for a maunfacturing company. The printer code itself is ZPL but the concept for EPL should be similar:
Code:
     output to value({file-name}).
     put "^XA^MCY^LH0,0".
     put "^PRC".
     put "^FO417,190^A0R,50,50^FDOur Order #:^FS".
     put "^FO417,452^A0R,50,50^FD" {v-order} "^FS".
     put "^FO149,80^A0R,250,225^FD" {v-pkg-id} "^FS".
     put "^FO42,92^BY5,2.5,132^B3R,N,132,N,N^FD" {v-pkg-id} "^FS".
     put "^FO100,38^A0N,25,25^FDCompany Slogan^FS".
     put "^FO53,772^A0I,20,20^FDa parent company subsidiary^FS".
     put "^FO268,768^A0I,36,27^FDCOMPANY NAME^FS".
     put "^FO270,768^GB202,5,5,B^FS".
     put "^FO385,35^A0N,15,15^FDSM^FS".
     put "^PQ2,0,0,N".
     put "^XZ".
     output close.
     unix silent lp -c value({print-queue}) value({file-name}).
     unix silent rm -f value({file-name}).
One other thing you might try is "put unformatted" instead of "put" in your code.

I hope this helps,
sshowers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top