Link to home
Start Free TrialLog in
Avatar of rjef
rjefFlag 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
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 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
Avatar of Bill Prew
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
Also you might try setting the line length with something like:

Printer.TextWidth 250

and see if that works.


»bp
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.
Avatar of rjef

ASKER

thanks