none
How to print Barcode with details on a sticker?

    Question

  • I've Zebra TLP2844 printer that print barcode stickers. The user should select an item and press the print button, then a sticker comes out of the printer with a unique barcode + item's details, like name, weight, and price. I know about printDocument, but I can't use to generate unique barcodes for each item. I don't have experience with this stuff unfortunately and am willing to learn. How can I implement this function in my application?.
    Saturday, March 13, 2010 12:47 AM

Answers

  • Dan, there is no need to use any barcode fonts or 3rd party software with this printer, this printer is designed for printing barcodes. These Zebra printers have their own internal language "EPL2" you can find the manual on their website at http://www.zebra.com/id/zebra/na/en/index/resource_library/manuals.results.html?FRRBarcodePrinters=58

    To print a barcode you simply send a raw text string with the proper (text, font, barcode type, size, etc.) commands to the printer. This can be a little confusing at first but once you get the hang of it things work quite well.

    Once you get the string formatted correctly you will need a way to send the raw data to the printer, this can be tricky and there are several ways to do it. Microsoft has a support article for doing this, it's what I use and it works well. http://support.microsoft.com/kb/322090

    I would start by setting up Microsofts RawPrinterHelper classs as described in the article then sending some simple barcode strings to the printer to get started.

    If you need any help or sample barcode strings let me know and I'll post some examples.

    Perrin

     

    • Marked as answer by DanSogaard Tuesday, March 16, 2010 5:19 AM
    Monday, March 15, 2010 2:36 AM
  • Yes it's proper placement. The priner prints barcode and text, but not in the correct position. My label as I mentioned in my previous post is 75mm width and 13mm height. I want to place the barcode in the 22.5mm area, and the other 22.5 for the product details. And the 30mm should be for name.

    Here is my string, as for my understanding parameters should be put in dots format, so I have to convert values to dots:


    N
    q600 >>> The width of the label, since its 75mm, then you conv mm to inch and * 203 to get it in dots (600 dots)
    Q13,3 >>> The height of the label, its 13mm, by conv it to dots, it should be equal to 103, but I didn't get the proper result, however value 13 gave me the proper height accordingly.

    B13,13,0,UA0,2,2,50,N,"603679025109" >> This is a UPC barcode, the first 2 parameters are for x, y values. I don't know what are x and y values on my label. How do you get the x, and y values on your label, so you can get the exact value?. Parameter number 7 which is "50" should refer to the height of the barcode.

    A253,26,0,3,1,1,N,"DR 0.48 CT"
    A410,26,0,3,1,1,N,"DanSogaard"
    P1,1

    Anyway, I got fair result, but not the exact placement I want. There should be an easier way to do the EPL code. At least somthing to figure out the coordination of the label so you can place the values right where you want.


    Edit: BTW This is a very helpful blog I wanted to share:
    http://nicholas.piasecki.name/blog/2009/03/sending-raw-epl2-directly-to-a-zebra-lp2844-via-c/

    • Marked as answer by DanSogaard Wednesday, March 17, 2010 10:45 PM
    Wednesday, March 17, 2010 10:23 PM

All replies

  • Any help?.
    Saturday, March 13, 2010 9:56 PM
  • Hi Dan,

    you can use a barcode font that you can find on the net ...

    application that uses barcode font

    application that does NOT use barcode font

    or checkout some of the other codeproject solutions:


    Best Regards,
    Vladimir
    Sunday, March 14, 2010 12:52 AM
  • heres one that I have used http://barcoderender.codeplex.com/

    Zen.Barcode.BarcodeDrawFactory.Code128WithChecksum.Draw(str, iwidth, iheight);//returns Image object

     


    Please remember to click “Vote as Helpfulll” on the post that helps you

    • Proposed as answer by tsadigov Monday, March 15, 2010 2:13 PM
    • Edited by tsadigov Monday, March 15, 2010 2:15 PM
    • Unproposed as answer by DanSogaard Tuesday, March 16, 2010 5:20 AM
    Sunday, March 14, 2010 1:59 PM
  • Thanks, I'll take a look at this and get back later.
    Sunday, March 14, 2010 2:08 PM
  • Dan, there is no need to use any barcode fonts or 3rd party software with this printer, this printer is designed for printing barcodes. These Zebra printers have their own internal language "EPL2" you can find the manual on their website at http://www.zebra.com/id/zebra/na/en/index/resource_library/manuals.results.html?FRRBarcodePrinters=58

    To print a barcode you simply send a raw text string with the proper (text, font, barcode type, size, etc.) commands to the printer. This can be a little confusing at first but once you get the hang of it things work quite well.

    Once you get the string formatted correctly you will need a way to send the raw data to the printer, this can be tricky and there are several ways to do it. Microsoft has a support article for doing this, it's what I use and it works well. http://support.microsoft.com/kb/322090

    I would start by setting up Microsofts RawPrinterHelper classs as described in the article then sending some simple barcode strings to the printer to get started.

    If you need any help or sample barcode strings let me know and I'll post some examples.

    Perrin

     

    • Marked as answer by DanSogaard Tuesday, March 16, 2010 5:19 AM
    Monday, March 15, 2010 2:36 AM
  • Thank you Kilot, your post has actually given me some thoughts to refine my search and came up with several articles that hopefully do the job, I'll be posting later when I get results of them. At the mean time I'm looking forward to see some of your examples, they might save me some time. Thanks for time.
    Tuesday, March 16, 2010 5:19 AM
  • Dan, there is no need to use any barcode fonts or 3rd party software with this printer, this printer is designed for printing barcodes. These Zebra printers have their own internal language "EPL2" you can find the manual on their website at http://www.zebra.com/id/zebra/na/en/index/resource_library/manuals.results.html?FRRBarcodePrinters=58

    To print a barcode you simply send a raw text string with the proper (text, font, barcode type, size, etc.) commands to the printer. This can be a little confusing at first but once you get the hang of it things work quite well.

    Once you get the string formatted correctly you will need a way to send the raw data to the printer, this can be tricky and there are several ways to do it. Microsoft has a support article for doing this, it's what I use and it works well. http://support.microsoft.com/kb/322090

    I would start by setting up Microsofts RawPrinterHelper classs as described in the article then sending some simple barcode strings to the printer to get started.

    If you need any help or sample barcode strings let me know and I'll post some examples.

    Perrin

     


    I thought if I just paint barcode on a Bitmap object and send it to the printer it will accept this. Do I have to use EPL? Or is there an option to paint it myself?

    .NET guy
    Tuesday, March 16, 2010 8:59 AM
  • If the printer is new or if you have not been using it for a while I would suggest doing a memory dump before using it. To do this turn the printer off, hold down the line feed button on the front of the printer and while holding it turn the printer back on. When the line feed button starts to blink release it. The printer will then do a diagnostics test and clear out it's memory, a few labels will spit out then it will print out a diag. report.

    Here are a couple examples of strings to send to the printer

    This will Print a UPC Barcode and short Product Name on a small .75 x 1.25" label
    "N 
    OD 
    q254 
    A0,20,0,4,1,1,N,"Text Here"
    B0,50,0,UA0,2,5,90,B,"824649005956"
    P1"

    This will Print an Address Label with Barcode and company logo on a 4 x 3" label 
    The GG30 line will print the company logo, the logo must be loaded into the printer's memory, remove this line"

    "N
    q816
    D14
    GG30,10,"LACIS"
    B500,50,0,3,2,5,120,B,"99051110"
    A535,25,0,4,1,1,N,"3/16/2010"
    A450,230,0,4,1,1,N,"Phone: 510-843-7178"
    A50,320,0,4,1,1,N,"LACIS"
    A50,350,0,4,1,1,N,"2982 Adeline St."
    A50,380,0,2,2,2,N,"Berkeley CA  94703"
    P1"

    Hope this helps. Let me know if you need more.
     

    Tuesday, March 16, 2010 4:24 PM
  • You really have to use the EPL language, these printers are not designed to print graphics and they only print at 203dpi. Printing a graphic may work but it won't work nearly as well, as fast or readable as using the EPL language. Readability should be a main concern here and the EPL language will always give you a good readable barcode and it's fairly easy to use.
    Wednesday, March 17, 2010 3:23 AM
  • Our printer is not here at the moment
    is there any emulator where I can try using EPL to get used to it?
    .NET guy
    Wednesday, March 17, 2010 8:00 AM
  • I'm having trouble setting up the label, I can't get it right and I kinda wasted like 100 labels in the process. Is there anyway to test the EPL code before printing it?. Thats exactly how my label looks like:

    http://www.jewelrylabel.com/en/components/com_virtuemart/shop_image/product/bb05dbe24522cad55ffecbca7e39d864.png

    It's 75mm width/ 1.3mm height, I want to place the barcode in one of the 22.5mm areas and the other 22.5 carry text description for stone. And the 30mm area should be for supplier id.

    Edit: and btw its connected through USB port.
    Wednesday, March 17, 2010 8:38 AM
  • Sorry, I don't know of an emulator being available.
    Wednesday, March 17, 2010 3:59 PM

  • Dan,

    What problem are you haveing, proper placement? Not printing? Can you post the string you are sending to the printer?

    Once things are printing it should be a simple task to try different top and left positioning points to get the text and barcode to print where you want them.

    It shouldn't matter what port you are printing to, I print to both USB and Parallel ports.
    Wednesday, March 17, 2010 4:01 PM
  • Yes it's proper placement. The priner prints barcode and text, but not in the correct position. My label as I mentioned in my previous post is 75mm width and 13mm height. I want to place the barcode in the 22.5mm area, and the other 22.5 for the product details. And the 30mm should be for name.

    Here is my string, as for my understanding parameters should be put in dots format, so I have to convert values to dots:


    N
    q600 >>> The width of the label, since its 75mm, then you conv mm to inch and * 203 to get it in dots (600 dots)
    Q13,3 >>> The height of the label, its 13mm, by conv it to dots, it should be equal to 103, but I didn't get the proper result, however value 13 gave me the proper height accordingly.

    B13,13,0,UA0,2,2,50,N,"603679025109" >> This is a UPC barcode, the first 2 parameters are for x, y values. I don't know what are x and y values on my label. How do you get the x, and y values on your label, so you can get the exact value?. Parameter number 7 which is "50" should refer to the height of the barcode.

    A253,26,0,3,1,1,N,"DR 0.48 CT"
    A410,26,0,3,1,1,N,"DanSogaard"
    P1,1

    Anyway, I got fair result, but not the exact placement I want. There should be an easier way to do the EPL code. At least somthing to figure out the coordination of the label so you can place the values right where you want.


    Edit: BTW This is a very helpful blog I wanted to share:
    http://nicholas.piasecki.name/blog/2009/03/sending-raw-epl2-directly-to-a-zebra-lp2844-via-c/

    • Marked as answer by DanSogaard Wednesday, March 17, 2010 10:45 PM
    Wednesday, March 17, 2010 10:23 PM