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
rjefAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
At first look this seems reasonable.  A few questions.

  1. Did this ever work for you, or is this your first try?
  2. Can you see the print "job" getting started in the printer queue and then going away after a short time?
  3. When you print from the VB application, is the default printer set to the bar code printer, and using the text driver?
  4. Does anything print at all, or nothing?


»bp

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rjefAuthor Commented:
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 PrewIT / Software Engineering ConsultantCommented:
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
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

Bill PrewIT / Software Engineering ConsultantCommented:
Also you might try setting the line length with something like:

Printer.TextWidth 250

and see if that works.


»bp
Theo KouwenhovenApplication ConsultantCommented:
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.
rjefAuthor Commented:
thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.