שתף באמצעות


Printing from VB to a Zebra Label Printer

Question

Tuesday, September 6, 2011 5:55 PM | 1 vote

Hello all;

I am having an issue printing labels from a form in visual studio. I help help with this. I have looked at all of the links concerning this, and tried to adpt the code in my project to print labels/barcodes and can't seem to get it to work. I have a Zebra TLP 2844 label printer and when I send the ZPL Code to the label printer, it prints out the text of the code.

I followed one link on here to download and install a program in Windows to allow the commands to be sent directly to the print spooler, bypassing the driver so that the Zebra Printer would receive the Raw Data instead of interpreting it as text, but still no luck.

I dont know what I am doing wrong, can someone please help. Let me know what you need to see as in my code and I will post it.

Thanks.

 

Todd Lerew

All replies (7)

Wednesday, September 7, 2011 1:51 AM ✅Answered | 2 votes

maybe this is helpful - http://www.codeproject.com/KB/vb/ZebraEPL2Printing.aspx

also this - https://support.zebra.com/cpws/docs/zpl/zpl_elp_vbnet.htm

lastly - http://nicholas.piasecki.name/blog/2009/03/sending-raw-epl2-directly-to-a-zebra-lp2844-via-c/ - would need to be converted


Friday, September 9, 2011 12:48 PM

Thanks - I will check out the threads/links.Todd Lerew


Tuesday, October 22, 2013 2:32 AM

I've managed to create a work around for this issue and can now print to the KA barcode printerusing the universal driver for the Zebra printer. Now I think I either have a code issue or there is a command that I am not issuing to the printer.
When I first send from Excel the print out is correct. If I stay in the Excel instance and try to print again I either get nothing out of the printer, or I get every other output printed. I.e. the normal expected sequence is 1,2,3,4 what I'm getting is 1,3,5. This is highly annoying as it works fine if I close Excel and open it again OR I cycle power on the printer.
Some variable somewhere is gumming up the works and I can't figure it out.
I've used the msgbox in place of the printout command and the logic appears to work fine (increments correctly). I've built the command string and saved it to Cell $A$1 to a spreadsheet and then used the printout command to send it to the printer. I've added the pass through symbols to the string that allow the command string to go directly to the printer. Can anyone spot what I'm doing wrong?


Tuesday, October 22, 2013 3:03 AM

I've managed to create a work around for this issue and can now print to the KA barcode printerusing the universal driver for the Zebra printer. Now I think I either have a code issue or there is a command that I am not issuing to the printer.
When I first send from Excel the print out is correct. If I stay in the Excel instance and try to print again I either get nothing out of the printer, or I get every other output printed. I.e. the normal expected sequence is 1,2,3,4 what I'm getting is 1,3,5. This is highly annoying as it works fine if I close Excel and open it again OR I cycle power on the printer.
Some variable somewhere is gumming up the works and I can't figure it out.
I've used the msgbox in place of the printout command and the logic appears to work fine (increments correctly). I've built the command string and saved it to Cell $A$1 to a spreadsheet and then used the printout command to send it to the printer. I've added the pass through symbols to the string that allow the command string to go directly to the printer. Can anyone spot what I'm doing wrong?

First you're posting a question in an already answered thread so it's unlikely you will get an answer if anybody looks at the thread at all. So I recommend you post a new question with your issue. And maybe reference this thread in your question if it has any relevance to your question and if so explain what that is in your question.

Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image will somehow become "unstable" or something to that effect. :) I can only surmise that is due to Global Warming of the threads.


Tuesday, October 22, 2013 4:27 AM

I've managed to create a work around for this issue and can now print to the KA barcode printerusing the universal driver for the Zebra printer. Now I think I either have a code issue or there is a command that I am not issuing to the printer.
When I first send from Excel the print out is correct. If I stay in the Excel instance and try to print again I either get nothing out of the printer, or I get every other output printed. I.e. the normal expected sequence is 1,2,3,4 what I'm getting is 1,3,5. This is highly annoying as it works fine if I close Excel and open it again OR I cycle power on the printer.
Some variable somewhere is gumming up the works and I can't figure it out.
I've used the msgbox in place of the printout command and the logic appears to work fine (increments correctly). I've built the command string and saved it to Cell $A$1 to a spreadsheet and then used the printout command to send it to the printer. I've added the pass through symbols to the string that allow the command string to go directly to the printer. Can anyone spot what I'm doing wrong?

You can also look at the threads at this link to see if any of them can help you.

Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image will somehow become "unstable" or something to that effect. :) I can only surmise that is due to Global Warming of the threads.


Monday, September 22, 2014 5:48 PM

Using a couple WIN32 API calls to bypass the print spooler pre-processor, printing directly to the Zebra printer really worked well in VB6 on a Windows 7 machine.  I ended up with sliders to control bar-code height and position as well as the interpretation line below:  I didn't like the look of the automatically generated interpretation line font so that turned into a couple of sliders as well.   You can save and load settings from file.  This was all tested on a 600DPI 110Xi4 printer.

VB6 Project:  http://ppl.ug/LN_YSKNylr8/

ZPL reference:  http://ppl.ug/2PLcr3Jh4dI/


Monday, September 22, 2014 6:36 PM

Using a couple WIN32 API calls to bypass the print spooler pre-processor, printing directly to the Zebra printer really worked well in VB6 on a Windows 7 machine.  I ended up with sliders to control bar-code height and position as well as the interpretation line below:  I didn't like the look of the automatically generated interpretation line font so that turned into a couple of sliders as well.   You can save and load settings from file.  This was all tested on a 600DPI 110Xi4 printer.

VB6 Project:  http://ppl.ug/LN_YSKNylr8/

ZPL reference:  http://ppl.ug/2PLcr3Jh4dI/

That's great. Unless you program in VB.Net instead of antique code.

La vida loca