Avatar of rjef
rjef
Flag for United States of America asked on

ZPL not working correclty in vb6

why do I not get all the data when I run these ZPL commands in vb6

Private Sub Command5_Click()
Printer.Print "^XA"
Printer.Print "^FO100,100"
Printer.Print "^BXN,6,200"
Printer.Print "^FDZEBRA TECHNOLOGIES CORPORATION 333 CORPORATE WOODS PARKWAY VERNON HILLS, IL 60061-31 09ZEBRA TECHNOLOGIES CORPORATION 333 CORPORATE WOODS PARKWAY VERNON HILLS, IL 60061-3109^FS"
Printer.Print "^XZ"
Printer.EndDoc
End Sub

Open in new window

but if I use notepad with just the zpl and a generic text driver it prints all the data in the 2d barcode
Visual Basic Classic

Avatar of undefined
Last Comment
rjef

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Bill Prew

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
rjef

ASKER
1 first try
2 yes I get the printer out but in the 2d barcode the data is missing
3 text driver
4 yes the label prints but missing the data inside the 2d barcode
Bill Prew

Okay, what you have seems reasonable.  You might try sending all the data as one line to see if VB Print is maybe adding some extra characters or line breaks.

Private Sub Command5_Click()
Printer.Print "^XA^FO100,100^BXN,6,200^FDZEBRA TECHNOLOGIES CORPORATION 333 CORPORATE WOODS PARKWAY VERNON HILLS, IL 60061-31 09ZEBRA TECHNOLOGIES CORPORATION 333 CORPORATE WOODS PARKWAY VERNON HILLS, IL 60061-3109^FS^XZ"
Printer.EndDoc
End Sub

Open in new window


And now that I say that perhaps it's a line length limitation of some sort, you might try a test with much shorter data for the barcode so that line is less than 80 characters.

Just trying to get some clues...


»bp
Bill Prew

Also you might try setting the line length with something like:

Printer.TextWidth 250

and see if that works.


»bp
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Theo Kouwenhoven

Hi rjef,

  1. To be sure that there is no printer-driver, that messing-up something in the label, You can try to FTP it to the printer then you are sure that no info is added (or changed)
  2. You can also send it to a textfile or an not zpl-printer, than you can check the data send by the program.
rjef

ASKER
thanks