How To Print Zpl File To Zebra Printer

  
Active1 year, 6 months ago

Hi, I have a client with a Zebra 105SL label printer which is network shared. I need submit a print to it via an executed DOS 'copy' or 'print' copy from a 3rd party app or even DOS itself. I can submit my.zpl files to print successfuly from within Windows, eg notepad etc but not from direct from DOS or my 3rd party Windows program that executes a dos copy or print command. How to Print ZPL (Barcode label) to Zebra Barcode Printer by VB? Tech Sign In Page. Save the image as a pcx file ( open the image with windows Photo Editor and select properties and make the image type as Monocrome (1bit) and save the image as pcx. To see how the Image has to be send to the Zebra printer D) Now. In IE8 i just click on print and it prints a nice barcode to my only/default bar code printer, but not in IE9. Any help is much appreciated. This thread is locked.

Typically, when I plug in my Zebra LP 2844-Z to the USB port, the computer sees it as a printer and I can print to it from notepad like any other generic printer. However, my application has some bar code features. My application parses some input and generates an in-memory string of ZPL. How would I send this ZPL data to my USB device?

Jason 'Bug' FenterJason 'Bug' Fenter
1,3611 gold badge11 silver badges23 bronze badges

8 Answers

I found the answer.. or at least, the easiest answer (if there are multiple). When I installed the printer, I renamed it to 'ICS Label Printer'. Here's how to change the options to allow pass-through ZPL commands:

  1. Right-click on the 'ICS Label Printer' and choose 'Properties'.
  2. On the 'General' tab, click on the 'Printing Preferences..' button.
  3. On the 'Advanced Setup' tab, click on the 'Other' button.
  4. Make sure there is a check in the box labeled 'Enable Passthrough Mode'.
  5. Make sure the 'Start sequence:' is '${'.
  6. Make sure the 'End sequence:' is '}$'.
  7. Click on the 'Close' button.
  8. Click on the 'OK' button.
  9. Click on the 'OK' button.

In my code, I just have to add '${' to the beginning of my ZPL and '}$' to the end and print it as plain text. This is with the 'Windows driver for ZDesigner LP 2844-Z printer Version 2.6.42 (Build 2382)'. Works like a charm!

How To Print Zpl File To Zebra PrinterJason 'Bug' FenterJason 'Bug' Fenter
1,3611 gold badge11 silver badges23 bronze badges

I've found yet an easier way to write to a Zebra printer over a COM port. I went to the Windows control panel and added a new printer. For the port, I chose COM1 (the port the printer was plugged in to). I used a 'Generic / Text Only' printer driver. I disabled the print spooler (a standard option in the printer preferences) as well as all advanced printing options. Now, I can just print any string to that printer and if the string contains ZPL, the printer renders the ZPL just fine! No need for special 'start sequences' or funky stuff like that. Yay for simplicity!

Jason 'Bug' FenterJason 'Bug' FenterZpl
1,3611 gold badge11 silver badges23 bronze badges

Visual Studio C# solution (found at http://support.microsoft.com/kb/322091)

Step 1.) Create class RawPrinterHelper..

Step 2.) Create a form with text box and button (text box will hold the ZPL to send in this example). In button click event add code..

With this solution, you can tweak to meet specific requirements. Perhaps hardcode the specific printer. Perhaps derive the ZPL text dynamically rather than from a text box. Whatever. Perhaps you don't need a graphical interface, but this shows how to send the ZPL. Your use depends on your needs.

barrypickerbarrypicker
4,7762 gold badges44 silver badges58 bronze badges

You haven't mentioned a language, so I'm going to give you some some hints how to do it with the straight Windows API in C.

First, open a connection to the printer with OpenPrinter. Next, start a document with StartDocPrinter having the pDatatype field of the DOC_INFO_1 structure set to 'RAW' - this tells the printer driver not to encode anything going to the printer, but to pass it along unchanged. Use StartPagePrinter to indicate the first page, WritePrinter to send the data to the printer, and close it with EndPagePrinter, EndDocPrinter and ClosePrinter when done.

Mark RansomMark Ransom
233k31 gold badges300 silver badges528 bronze badges

Zpl File Editor

ZPL is the correct way to go. In most cases it is correct to use a driver that abstracts to GDI commands; however Zebra label printers are a special case. The best way to print to a Zebra printer is to generate ZPL directly. Note that the actual printer driver for a Zebra printer is a 'plain text' printer - there is not a 'driver' that could be updated or changed in the sense we think of most printers having drivers. It's just a driver in the absolute minimalist sense.

(.) • On the bottom right corner of your computer's monitor the following window will appear as installation continues and the drivers are built. Canon. • the driver files are copied, confirm the printer is powered on and then connect the USB cable to the computer and the printer.

Step 2 - Install Your Driver After you download your new driver, then you have to install it. Canon lbp 6030 driver free download for windows 7.

ThaeliThaeli

I spent 8 hours to do that.It is simple..

You shoud have a code like that:

Change that variable content from 3 (open file already exist) to 1 (create a new file).It'll work at Windows 7 and XP.

Nunser
4,4138 gold badges20 silver badges35 bronze badges
Rodrigo AquinoRodrigo Aquino

Install an share your printer: localhostzebraSend ZPL as text, try with copy first:

How To Print Zpl File

copy file.zpl localhostzebra

very simple, almost no coding.

ThomasThomas

You can use COM, or P/Invoke from .Net, to open the Winspool.drv driver and send bytes directly to devices. But you don't want to do that; this typically works only for the one device on the one version of the one driver you test with, and breaks on everything else. Take this from long, painful, personal experience.

What you want to do is get a barcode font or library that draws barcodes using plain old GDI or GDI+ commands; there's one for .Net here. This works on all devices, even after Zebra changes the driver.

Dour High Arch

How To Print Zpl File To Zebra Printer

Dour High Arch

How To Print Zpl

18.5k16 gold badges68 silver badges81 bronze badges

How To Print Zpl File To Zebra Printer

Not the answer you're looking for? Browse other questions tagged usbzebra-printerszpl or ask your own question.