Printing it as WinForm application is not uncommon with the SerialPort Class, as there's a lot of resources out there, but not so true for ASP .NET.
So I needed to google around and posted question to the forums. With some lucks and googling skills, i managed to let it works and add enhancement on that. But i found not full steps on web, so just to post this to help someone who might need it in the future.
1.a) Set the "Generic/Text Only" as default printer driver. Yes, you see it correctly, it's not zebra printer driver that match your zebra printer, since it's printed through web.
1.b.i) If you do not have it, you can go to any existing printer property page (right-click on any other printer driver) and add this driver.
1.b.ii) Browse to driver list start with "G", then you will find it. Finish this installation process.
2) Once you have the driver, setup the ASP designer with Zebra programming language (ZPL) like this (The buttons are for user to trigger the ZPL to send).
3) By calling the undocumented print() function (not window.print(), and I think it works on IE only) in javascript, you can print the zebra bar-code label through ASP.NET.
4) Keep the web form as clean code as possible, you will send it as ZPL and ZPL only to printer.
So I needed to google around and posted question to the forums. With some lucks and googling skills, i managed to let it works and add enhancement on that. But i found not full steps on web, so just to post this to help someone who might need it in the future.
1.a) Set the "Generic/Text Only" as default printer driver. Yes, you see it correctly, it's not zebra printer driver that match your zebra printer, since it's printed through web.
1.b.i) If you do not have it, you can go to any existing printer property page (right-click on any other printer driver) and add this driver.
1.b.ii) Browse to driver list start with "G", then you will find it. Finish this installation process.
2) Once you have the driver, setup the ASP designer with Zebra programming language (ZPL) like this (The buttons are for user to trigger the ZPL to send).
5) Print it! You should get it ;)
23 comments:
Very nice solution! I have a question, however. Will this work in a scenario where the client pc is not directly connected to the label printer (i.e. the label printer is a network printer to the client of the app). Seems that specifying the Generic/Text print driver on the client would prohibit choosing the desired network resource? I'm hoping i'm wrong :)
network resource? I do no think it works, unless that network printer is specified the Generic/Text print driver. :D
Thank you very much for your post.
I'm trying to print a barcode label from a web page and i don't understand where you see the result of the print() instruction.
I have not installed any driver of Zebra. I only have my EPSON printer :)
I have selected de Generic/Text Only driver but when i press "Print" button and select the printer nothing happens.
Thanks for your help.
Regards.
EPSON printer? Hmmm..., no idea.
this print() command is undocumented, I also could not find it thru' google, and it's in the part of the existing code that left from my previous colleague.
I'm trying to print to a LP 2844. If I change the driver to generic/text only, the printer does not respond to the print request. If I change the driver back to zebra, then it does not interpret the EPL. I have to use EPL on this printer and not ZPL.
Any help is appreciated.
what is that zebra programming code and where u get it from
its urgent?
what is that zebra programming code.
can u put more light on that
its little urgent
Great idea of printing the Zebra barcode
Plastic Card Printer
Can you send the code for the same?...If possible send it on
swapnil.k.fegade@gmail.com
I'm trying to print to a Zebra 2824 with EPL.
With the zebra driver the printer prints the EPL text.
I selected the Generic/Text and when i print and select the printer no document goes to the printer.
Can you help me on this?
Thank you!
Hello,
This is a nice post. It is all about the zebra labels. It is having a very high demand. Thank you..
zebra labels
Hi gary,
Thanks for your post. I have tried the same approach but the printer printing empty label or printing nothing.
can you please help me on this.
If you need a more complete shipping solution than what eBay and PayPal offer, some of our Certified Providers can help.Impresion de etiquetas en fibra de coco
Hey everyone find here the best Barcode Supplies in Anaheim, CA. EBarcode is the experience group that supplies electronics appliances, printers, scanners and other accessories.
nice blog!! visit here for barcodes supplies and scanners.
HI,
wow, great writing. very informative & helpful.
also i knew many things from this site
( Best Printer in the World). This site is also very trusted site.
can you tell me how to choose best printer? .
Also i want to mention that i read your post regularly.Your post is informative and helpful to us.
Thanks
Very informative blog. Thanks for sharing valuable information with us. For best Barcode Label Printer in the USA, you can contact Texas Barcode Systems.
Hey!! thank you for sharing information on how to print zebra barcode labels manufacturers
With cards becoming deeply ingrained into people’s lives, it has become important for business to have a POS machine. Aligned with market dynamics, The Barcosoft Tech offers you light weighted, fully-featured POS Machine dubai that offers you seamless payment processing facility. https://www.barcosofttech.com/products/point-of-sale
Zebra DS2208 BarCode Scanner in UAE, Zebra SR7U2100SGW Series BarCode Scanner in UAE, BarCode Scanner in UAE
https://gccgamers.com/zebra-series.html
Zebra DS2208 Scanner in UAE, Safe Shopping Multiple Payment Options Express Delivery GCC Gamers Moneyback Guarantee.
1633919068149-9
Thanks for your post.
A barcode scanner can read the specific sequence of bars and spaces, which indicate numbers and other things. Similarly, a Zebra barcode printer is available to print the barcode labels.
Post a Comment