CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 2011
    Posts
    1

    How to print graphics with zebra printer?

    Hi experts out there, I'm using Zebra printer model TPL 2844Z which understands ZPL command. I tried some coding and it worked only for text and barcode but I'm not able to print my company logo on the label. Can anyone please assist me on this? I'm sitting at desktop and firing commands and nothing expected is coming out of the printer Kindly advise me or point in the right direction please.

    'Open the port:
    Open "LPT1" For Output As #1

    Print #1, "^XA^FO20,127^XGR:Logo.GRF,1,1^FS" & _
    "^FS^FO20,200^ADN,36,20^FD" & b & _
    "^FS^FO241,200^ADN,36,20^FD" & i & _
    "^FS^FO121,401^ADN,36,20^FDRMA" & "^FS^XZ"

    'Close the port:
    Close #1


    The first line (logo) was not printed on the label. What am I doing wrong here? Do I need to add something or do some other settings? Please help.

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: How to print graphics with zebra printer?

    This is more suited to a Zebra printing forum as it really has very little to do with VB and everything to do with ZPL.

    That said your best bet for printing graphics is to use the pritiner object and the Zebra print driver rather than ZPL code. You can then put your graphic in a picturebox and send that to the printer. I have used this method in the past with Zebra printers.

    If you must do it in ZPL code then I would suggest you go to the Zebra site and see if you can get some help there.

    My guess would be that you first need to get your graphic file stored on the printer before you issue the command to print it. Exactly how you would get the graphic on there I do not know as I have worked only with text and barcodes in ZPL.
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,900

    Re: How to print graphics with zebra printer?

    I would agree with Datamiser

    In the meantime, how does the ZPL Code know where to find the LOGO ?

    eg, Do you need to have a path associated with the LOGO image or does it just know where to find the logo in the computer ???

    (Hardly)

    Code:
    eg, 
    
    Print #1, "^XA^FO20,127^XGR:c:\logofolder\Logo.GRF,1,1^FS" & _

  4. #4
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: How to print graphics with zebra printer?

    The image has to be sent to the printer at some point. The filename is not going to do it as that only sends the text of the filename. The file must be stored in the printer memory or sent to the printer in binary mode before it can be printed using the methods in the OP.
    Always use [code][/code] tags when posting code.

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: How to print graphics with zebra printer?

    If you or anyone are needing to print graphics to the printer you may want to give this page a once over. I just skimmed it but it appears to shed some light on the issue.

    https://km.zebra.com/kb/index?page=a...83717,706,719#

    Notice the actual image data is contained in the ZPL sent to the printer.
    Always use [code][/code] tags when posting code.

  6. #6
    Join Date
    Jun 2013
    Posts
    1

    Re: How to print graphics with zebra printer?

    You need help about printing graphics. You have shared a knowledge about the "print graphics with zebra printer". Every kind of printing is possible now a these days just follow the link for graphics printing.

    Printing Graphics
    Graphics Printing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured