We help IT Professionals succeed at work.

ZPL not working correclty in vb6

rjef
rjef asked
on
122 Views
Last Modified: 2019-05-12
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
Comment
Watch Question

Test your restores, not your backups...
CERTIFIED EXPERT
Expert of the Year 2019
Top Expert 2016
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

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 PrewTest your restores, not your backups...
CERTIFIED EXPERT
Expert of the Year 2019
Top Expert 2016

Commented:
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 PrewTest your restores, not your backups...
CERTIFIED EXPERT
Expert of the Year 2019
Top Expert 2016

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

Printer.TextWidth 250

and see if that works.


»bp
Theo KouwenhovenApplication Consultant
CERTIFIED EXPERT

Commented:
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.

Author

Commented:
thanks
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.